A small sample of the kind of things I'm into.
tethery - https://github.com/m4rkw/tethery
A simple script that bypasses tethering restrictions on iOS using vSSH and Proxifier.
crunch automation toolkit - https://github.com/m4rkw/crunch
A project I've started to automate Crunch accounting functions as cleanly as possible using PhantomJS.
Exploits for levels 1 through 9 of io.smashthestack.org and an automation script that runs through them in sequence echoing out the password for each level.
migrations - https://github.com/m4rkw/migrations
A clean and simple migrations gem for ruby that uses the (very awesome) Sequel database gem.
Gangsta Lean web framework - my super-lightweight ruby web framework. Currently very basic, use is not recommended however the framework is powering the website you're reading right now. :)
transmission-ng - https://github.com/m4rkw/transmission-ng
This gem is designed to provide a clean and simple ruby interface to the Transmission RPC API. It supports the latest version and is designed for simplicity and ease of use.
This is a simple repo that contains all my dotfiles, config and stuff I use frequently that isn't super-sekrit. It's on github so when hopping onto a new machine I can quickly clone it, run the setup script and have my environment all in place very quickly.
This is a script I wrote which automatically fills in the "use" clauses at the top of a Symfony 2 class. It quickly became annoying looking them up manually when editing code in vim so I automated it. Now when I press ctrl-u the file currently in the vim buffer is piped through usify and the use clauses are inserted/replaced at the top of the file.
OpenTracker - https://github.com/m4rkw/opentracker
OpenTracker is a specially made Arduino board by Geolink (formerly Tigal) designed for tracking vehicles. The software for it is open source which allows for great hacking potential.
I first found out about the device after scraping the web service for the Cobra tracker that was in my car, and subsequently causing them £18,000 worth of mobile fees after polling it every 60 seconds for a couple of months (oops). Needless to say they weren't best pleased, and neither was I as they said I could only poll it once an hour which was rubbish. I decided to build my own tracker out of Arduino parts but halfway through I found out about OpenTracker and realised it was going to be a much better solution than my cobbled together attempt.
I have now contributed a considerable number of new features to the OpenTracker codebase which have been merged upstream:
- - Added additional data to the data packet, including battery level, ignition state and the total engine running time.
- - Added a "locate" command that can be sent via SMS which responds with a google maps link of the current location. This can be configured as either a generic maps link or a specially crafted iOS link which opens the location in the iOS google maps app.
- - Added a a raw tcp send mode which minimises data throughput, and wrote a custom server-side logger daemon in ruby.
- - Added simple security features to the server-side daemon, including engine-off movement detection, engine started while at home, engine started overnight etc.
- - Added prowl support to the server-side logger for notifications.
- - Added a mode which disables checking for SMS commands when the engine is running, and replaced most of the delay() statements in the original code with checks for the final response from the model so no time is wasted. Overall this reduces the loop time from 24 seconds down to around 15-16.
- - Recently I have been working on using the google Directions API to fill in the route between the waypoints of logged journeys so that I can play them back on an animated google maps page. This isn't working as well as I'd like yet.
All of my changes have now been merged into the geolink master: https://github.com/geolink/opentracker.
My fork is available here: https://github.com/m4rkw/opentracker and although it's currently in sync with the geolink master, new features and stuff I'm working on will appear in feature branches here before it gets merged into the geolink repo.
Geolink have been kind enough to send me a development board so I can spend most time working on this, and some features I have planned include:
- - A complete rewrite of the original code to make it cleaner and faster
- - Geofencing with SMS/prowl alerts (eg get notified when someone is nearly home)
- - Encrypted transmissions for security
- - Connection to the OBD port to obtain diagnostic and system data from the ECU (OpenTracker contains a CANBUS interface but I've not yet attempted to wire it up to my car)
- - A new mode that enables a continuous TCP connection to the server in order to minimise bandwidth. Mobile service providers typically bill in 1kb increments, so even if you only send a 100-byte transmission every minute, they bill you for 1kb because a new TCP connection == a new "session".
switch-network - https://github.com/m4rkw/env/tree/master/switch-network
This is a simple script that figures out which network I'm currently on and runs up or down scripts accordingly. Eg if my network changes from "home" to "NONE" (couldn't determine a network) it will run the "home.down" script. If I then connect to the "work" network it will run "work.up". This is handy for setting routes and other network-specific config. Currently the network detection is pretty basic, it just pattern matches on the network subnet and so far that's all I've needed. When I eventually get into a situation where I use two networks on the same subnet I'll add add a way of specifying the mac address of the gateway so the network can be reliably infered.
This is a simple script which scans the SMART attributes of the specified disk and reports if there are any issues, like DMA errors or pending/offline sectors. It supports a simple display of the information, email alerting or running as a Nagios plugin. I've used this for years to catch disk problems before the drive fails completely, avoiding loss of data. This is yet another thing that I wrote years ago and never really got around to properly updating (although I have recently rewritten it in ruby).
Multi-purpose scraping engine
For many years I've enjoyed scraping and reusing data from various websites that hold information about me. One of the ways I do this is to harvest the data from my online banking/credit accounts and push transactions and changes to my iPhone within 5mins of them occuring. It's still odd that the banks aren't doing this themselves. I don't share the code for this publicly for obvious reasons but it's very useful.
TV re-packaging engine
I enjoy watching many TV shows from legitimate online sources. Sometimes it's difficult to find the time to watch stuff so I have created a small ecosystem that automatically obtains new episodes for the shows I like when they're available, re-encodes them to iPhone format and then exposes them as a private RSS feed which is then consumed by a podcast client on my iPhone. The result of this is that new episodes typically arrive on my phone overnight and are ready to watch when I'm on the train to work the next day. The code for this is private (and in serious need of a rewrite!).
iTunesRemoteSync - https://github.com/m4rkw/iTunesRemoteSync
A long time ago I wrote a small program which enabled iPhones to sync with iTunes remotely over a VPN. It was rather flaky but it generally worked. Of course nowadays nobody would use it because we're all syncing to the iCloud.
OpenCL SHA1 bruteforcer
For fun I once attempted to write a SHA1 bruteforcer using OpenCL so I could run it on GPUs for massive parallel computation. It was a very fun close-to-the-metal programming exercise and I obtained some pretty decent crunching speeds using an ATI card.
Binary disassembly wrapper for vim
I occassionally edit binary executables for various reasons. I'm not very fond of IDEs so I wrote some wrapper scripts that allow me to do this easily in vim. When a binary file is opened, the wrapper disassembles and neatly formats the file so it can be edited, then opens the disassembly in vim. When the disassembly is saved and vim exits the changes are then automatically made in the binary. This code isn't currently public but when I have some time I might clean it up and throw it on github.
AutoInvoice - https://github.com/m4rkw/autoinvoice
I wrote this a long time ago and don't use it anymore, but it was very useful at the time. The idea is you drop tags into Google Calendar on the days you're planning to invoice, and then if autoinvoice is running via cron it should all just happen magically. These days I use Crunch and haven't gotten around to automating invoicing yet. Last time I checked their API didn't support it and scraping the application looked like a pain, but that was a long time ago so maybe they have a better API now.
things-inject - https://github.com/m4rkw/things-inject
A long time ago I used to jailbreak my iPhone and use the Things todo list app. This was a simple script I wrote that allowed me to inject new items into the Things list programmatically. These days I use a combination of OmniFocus and the apple Reminders app to manage my task lists.