This is a quick guide on installing HTTPie for Mac OS X systems. This is also useful if you want the python package management utility pip
. An installed copy of Homebrew is a prerequisite.
brew install httpie
// Usage: http://localhost:8080/image.jpg/100x50 | |
var http = require('http'); | |
var spawn = require('child_process').spawn; | |
http.createServer(function(req, res) { | |
var params = req.url.split('/'); | |
var convert = spawn('convert', [params[1], '-resize', params[2], '-']); | |
res.writeHead(200, {'Content-Type': 'image/jpeg'}); | |
convert.stdout.pipe(res); |
require 'nokogiri' | |
require 'open-uri' | |
doc = Nokogiri::HTML(open('http://pizza.de/order/world-of-pizza/02/framek030.htm')) | |
menu = doc.xpath('//td[@id="framek"]//div[2]/div/div[1]/div[1]/b').to_a | |
puts "# Our Menu:\n * #{menu * ", \n * "}" | |
puts | |
puts "I'd recommend *#{menu.sample.content}*." |
// swap the keybindings for paste and paste_and_indent | |
{ "keys": ["super+v"], "command": "paste_and_indent" }, | |
{ "keys": ["super+shift+v"], "command": "paste" } |
# Use git and git+ssh instead of https | |
[url "git://github.com/"] | |
insteadOf = https://github.com/ | |
[url "git@github.com:"] | |
pushInsteadOf = "git://github.com/" | |
[url "git@github.com:"] | |
pushInsteadOf = "https://github.com/" |
$ history | awk {'print $2, $3, $4'} | sort | uniq -c | sort -k1 -rn | head -n 30 | |
610 git status | |
568 git commit -m | |
491 git add . | |
252 git push origin | |
176 bundle | |
138 rails s | |
128 ls | |
120 git commit --amend | |
114 git reset --hard |
# Your first year in Legacy Code | |
Working in heavy Legacy Code with no structure is challenging. If you really want to improve yourself in such an "hostile" environment, | |
you need the right tools and strategies. | |
In this talk I will cover: | |
- what I learned during my first year working in the IT business. | |
- big victories against simple | |
- sometimes you just have to give up |
# Start the old vagrant | |
$ vagrant init centos-6.3 | |
$ vagrant up | |
# You should see a message like: | |
# [default] The guest additions on this VM do not match the install version of | |
# VirtualBox! This may cause things such as forwarded ports, shared | |
# folders, and more to not work properly. If any of those things fail on | |
# this machine, please update the guest additions and repackage the | |
# box. |
This is a quick guide on installing HTTPie for Mac OS X systems. This is also useful if you want the python package management utility pip
. An installed copy of Homebrew is a prerequisite.
brew install httpie
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
module NewRelic | |
class SidekiqException | |
def call(worker, msg, queue) | |
begin | |
yield | |
rescue => exception | |
NewRelic::Agent.notice_error(exception, :custom_params => msg) | |
raise exception | |
end | |
end |