-
Simplest intro to git by github and codeschool - Try Git
-
[Intro to github]
require 'rubygems' if RUBY_VERSION < '1.9' | |
require 'tempfile' | |
require File.join(ENV['JETPAC_PATH'], 'library/logger') | |
require File.join(ENV['JETPAC_PATH'], 'library/email') | |
def image_command(command) | |
log "IMG: Running '#{command}'" | |
result = system(command) | |
if !result |
# | |
# Mudasobwa yadr theme. | |
# | |
# Based on Agnoster theme from https://gist.github.com/3712874 | |
# | |
# NB! In order for this theme to render correctly, you will need a | |
# [Powerline-patched font](https://gist.github.com/1595572). | |
# | |
# Authors: | |
# agnoster (original) |
Install convmv if you don't have it
sudo apt-get install convmv
Convert all files in a directory from NFD to NFC:
convmv -r -f utf8 -t utf8 --nfc --notest .
I have spent quite a bit of time figuring out automounts of NFS shares in OS X...
Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:
/etc/auto_master (see last line):
#
# Automounter master map
#
+auto_master # Use directory service
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |
adapted from the article "Crawling anonymously with Tor in Python" by S. Acharya, Nov 2, 2013.
The most common use-case is to be able to hide one's identity using TOR or being able to change identities programmatically, for example when you are crawling a website like Google and you don’t want to be rate-limited or blocked via IP address.
Install Tor.
I should preface this by saying that I got a Withings Smart Body Analyzer for Christmas last year and I’ve been generally happy with it. It purports to be able to take my heart rate through my bare feet and that seems not to work for my physiology, but overall I’m a fan. If if their Wikipedia page is to be believed they are having a pretty rad impact on making the Quantified Self movement more for normal people and they only have 20 full time employees. Also they try hard to use SI units, which I can get behind. Anyway, on to the rant.
I originally called this post “Everything wrong with the Withings API” and I meant it. For every useful field I can extract from their “award winning” app, I have spent an hour screaming at the inconsistencies in their implementation or inexplicable holes in their data
// UPD: | |
// Now available as npm module! | |
// Check out https://github.com/RReverser/better-log for details. | |
console.log = (function (log, inspect) { | |
return function () { | |
return log.apply(this, Array.prototype.map.call(arguments, function (arg) { | |
return inspect(arg, { depth: 1, colors: true }); | |
})); | |
}; |