Post tagged: scripts

RDP vs VNC

For years I have been using VNC for my remote desktop needs. This works usually well enough. The features that I like are: Basic set-up is easy Desktop sessions are persistent Can be used to view an actual X11.org desktop. ...

Meta Database

So I was looking for a way to version control database schemas, but I never found something that worked for me. I found all these options that never seem to match what I wanted: metabase dbv ...

Python Virtual Environments

This is the least you need to know to get to use a Python virtual environment. What is a Virtual Environment At its core, the main purpose of Python virtual environments is to create an isolated environment for Python projects. This means that each project can have its own dependencies, regardless of what ...

Ad-Hoc rsync daemons

The other day I needed to copy a bunch of files between to servers in my home network. Because of the volume I wanted to copy the files without having to go through ssh's encryption overhead. So I figured I could use netcat for the data transport. To do that I wrote these short scripts. Remote scripts ...

Archiving DVDs and CDs

Since now I have a Android TV I put away my HTPC and with that the capability to view DVDs or listen CDs directly. So I converted my entire CD and DVD library to media files and stored in my home NAS. Since we are talking hundreds of DVDs and CDs, I was using some tools. CD ripping For CD ripping, pretty much everything can be done with abcde. ...

Writing Safe Shell scripts

Writing shell scripts leaves a lot of room to make mistakes, in ways that will cause your scripts to break on certain input, or (if some input is untrusted) open up security vulnerabilities. Here are some tips on how to make your shell scripts safer. Don't The simplest step is to avoid using shell at all. Many higher-level languages are both easier to write the code in in the first place, and avoid some of the issues that shell ...

Wi-Fi Sd Cards

My latest weekend project. Making a normal digital camera WIFI enabled. With the Transcend Wi-Fi SD Card you can convert any digital camera into a Wi-Fi enable camera. What I did here is to set it up so that it would automatically upload photos whenever I turn the camera on while at home. The nice thing about this camera is that it runs a fully functional Linux environment within the card. The manufacturer was also nice enough to give you the opportunity to customize the card by running arbitrary shell scripts from the SD card itself. My code is in github. ...

Raspberry Pi Weekend project

So finally took the time to try out a Raspberry Pi. For this weekend project wanted to do something relatively simple. Essentially, I wanted to recreate/enhance the functionality of a TL-WR702N. The TL-WR702N Nano Router is a neat device but being closed, can not be customized to what I wanted. It can be used in the following modes: ...

Driving Continuous Integration from Git

Testing, code coverage, style enforcement are all check-in and merge requirements that can be automated and driven from Git. If you're among the rising number of Git users out there, you're in luck: You can automate pieces of your development workflow with Git hooks. Hooks are a native Git mechanism for firing off custom scripts before or after certain operations such as commit, merge, applypatch, ...

assist

Assist is my archlinux scripted installation script. https://github.com/alejandroliu/assist By default it gives you a menu driven archlinux installation with supposedly sensible defaults. It has command line hooks so that you can perform automated installs using bash scripts to customize it. ...

SSH Tricks

A bunch of stupid SSH tricks that can be useful somehow, somewhere... Forcing either IPv4 or IPv6 This is for the scenario that you know which specific protocol works to reach a particular host. Usually good to eliminate the delay for SSH to figure out to switch IP protocols. For IPv4: ssh -4 [email protected] ...

Web Backups

As usual with any IT system backups are important. This does not change when using a free shared hosting provider. Because it is free, one would argue it is even more important. For my wordpress web site I used something called cli-exporter. It let's you create "Wordpress" export files from the command line so it can be run from cron. This is important because backups have to be automated. In addition to that, I copy the backup files to an off-site location. I do this by copying files using WebDAV to a storage provider. I did this by writing a simple script and using the PHP library SabreDAV which makes writing DAV clients quite easy. I myself don't mind using other people's Open Source code to do something. I was actually surprised that I was not able to find something that meet my criteria. However, thanks to the power of open source I was able to find something that fit the bill exactly. To make things more interesting, because I wanted to keep backup files as compressed Zip archives, my backup scripts did not work in one of the web hosts that I was using. They did not have the zip extensions enabled. This is surprising considering is quite standard. Luckily I was able to find a pure PHP library pclzip. ...