I wrote this up here: http://blog.steveklabnik.com/posts/2012-02-27-hypermedia-api-reading-list
Moved to https://github.com/apeiros/available |
class Array | |
def >>(other); self + [other]; end | |
def to_proc(*args) | |
->(r) { inject(r){ |o,(m,*args)| o.send(m,*args) } } | |
end | |
def apply(rec) | |
self.to_proc[rec] | |
end |
These are some of my (Ryan Bates) favorite gems to use for various tasks:
- JavaScript: jQuery with jquery-rails
- Pagination: Kaminari
- Testing: RSpec, Cucumber and Capybara
- Factories: Factory Girl
- Authentication: Nifty Generators and Omniauth
- Authorization: CanCan
- File Attachments: Carrierwave
- HTML/XML Parsing: Nokogiri
// Example of running Ruby in a separate thread | |
// 2012-01-08 by Jeff Trull <jetrull@sbcglobal.net> | |
#include <iostream> | |
#include <queue> | |
#include <string> | |
#include <set> | |
#include <boost/thread.hpp> | |
#include <boost/thread/mutex.hpp> |
git-prebase improves on 'git rebase -i' by adding information per commit regarding which files it touched.
- Each file gets an alpha-numeric identifier at a particular column, a list of which appears below the commit list. (The identifiers wrap around after the 62nd file)
- Commits can be moved up and down safely (without conflicts) as long as their columns don't clash (they did not touch the same file).
Add the executable to your path and git will automatically expose it as
# 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL | |
# 0.2 If you are on the Mac, make sure you have a c compiler by installing XCode Command Line Tools or gcc4.2 with homebrew | |
# https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers | |
# 0.5 Make sure you have bundler version ~> 1.2 as Rails depends on it | |
gem install bundler | |
# 1. Get edge Rails source (master branch) | |
git clone https://github.com/rails/rails.git |
This allows you to use the following video streaming services outside of the US from your Mac without having to use a proxy or VPN, so no big bandwidth issues:
- Hulu / HuluPlus
- CBS
- ABC
- MTV
- theWB
- CW TV
- Crackle
- NBC
$stack, $draws = [], {} | |
def method_missing *args | |
return if args[0][/^to_/] | |
$stack << args.map { |a| a or $stack.pop } | |
$draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :< | |
end | |
class Array | |
def +@ |
You should never let passwords or private data be transmitted over an untrusted network (your neighbor’s, the one at Starbucks or the company) anyway, but on a hacker congress like the #30C3, this rule is almost vital.
Hackers get bored easily, and when they’re bored, they’re starting to look for things to play with. And a network with several thousand connected users is certainly an interesting thing to play with. Some of them might start intercepting the data on the network or do other nasty things with the packets that they can get.
If these packets are encrypted, messing with them is much harder (but not impossible! – see the end of this article). So you want your packets to be always encrypted. And the best way to do that is by using a VPN.