dtbaker’s blog
Here’s the blog! Just a bunch of random bits and pieces.
Web Dev…
PHP script to send Autoreplies
Here is a quick PHP script to send autoreplies to emails based on filters. This was created because the gmail autoreplies go to the “return-path” which in our situation is a mandrill “bounce” address. In our situation the gmail autoreplies were just going to the mandrill bounce address so we had to use this script. [...]
Github stuff
Just a bunch of git related things (I keep forgetting how to do them!) How to add new files to an existing Github repository # first create your repository in github cd ~/your-files-to-add/ git init . git remote add origin git@github.com:yourname/yourrepo.git git pull origin master git add “list-of-files-to-add-to-github” git commit -m “some comment” git push [...]
PHP script to send Auto Replies from Gmail
GMail autoresponders (eg: filter + canned responses) will get sent to the senders “Return-Path”. When an email comes from Mandrill the “Return-Path” is a mandrill address, not the senders address. So gmail autoresponders do not work for any email that comes from mandrill (or other services who set a Return-Path different to the senders address). [...]
Linux…
Tunnelling over DNS UDP port 53
Tried these with various levels of success: Your computer: socat tcp4-listen:5353,reuseaddr,fork UDP:your-server-ip-address:53 Server where you have root access and nothing already listening on port 53: sudo socat -T15 udp4-recvfrom:53,reuseaddr,fork tcp:localhost:5353 This will create a tunnel from any local TCP connections to localhost:5353 – over UDP port 53 – back to TCP port localhost:5353 on the [...]
Random…
Android ICS on HTC Desire with USB Host Mode
Install CronMod on your HTC Desire (see this thread: http://forum.xda-developers.com/showthread.php?t=1946517 ) build custom kernel with USB host mode support: git clone git@github.com:croniccorey/eternity-kernel.git git checkout remotes/origin/ics apply Host Mode patch: make clean make bravo_defconfig make menuconfig (select USB options, deselect USB gadget support) $ grep MSM .config|grep -v ‘not set’|grep USB CONFIG_USB_EHCI_MSM7201=y make -j4 Install kernel and modules to [...]
Android: Unknown symbol _GLOBAL_OFFSET_TABLE_
[ 1525.047424] bcm4329: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0) I received this error after compiling a custom Android kernel and modules using the arm-linux-androideabi-4.4.3 prebuilt toolchain. I used arm-linux-androideabi-4.4.3 instead of arm-eabi-4.4.0 because arm-eabi-4.4.0 did not work for me on 64bit ubuntu ( * shrug * ) To fix this and to get my kernel modules loading I opened the [...]
HOWTO: enable SSH on Android and network ADB
Activate debugging and network debugging on the android device. Find out the IP of your android device. Run adb on your computer connecting to android over the network: adb connect 192.168.0.16:5555 # displays “connected” message adb shell id # displays “uid=0(root) gid=0(root)” Enabling SSH: Push your public key to the android device to allow password-less [...]
Arduino Stop Watch with Laser Pointer trigger
Here’s the video: EtherTen plus a DMD display (from Freetronics) connected to a simple LDR and laser pointer. Reports times back to computer for easy recording. Next step is to create a bunch of these on the same network, so there can be a start/stop/midpoint and multiple displays. All configurable from a central computer (ie: [...]
