An introduction to curl using GitHub's API
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
# encoding: utf-8 | |
""" | |
A python logging Handler that use ZeroMQ (ØMQ). | |
+------+ +------+ +-------+ | |
| app1 | | app2 | | app X | | |
+------+ +------+ +-------+ | |
| PUSH | PUSH | PUSH | |
| | | |
import zmq | |
def main(): | |
try: | |
context = zmq.Context(1) | |
frontend = context.socket(zmq.SUB) | |
frontend.bind('tcp://*:5559') | |
frontend.setsockopt(zmq.SUBSCRIBE, '') |
import re | |
from scrapy.link import Link | |
from urlparse import urljoin | |
from BeautifulSoup import BeautifulSoup | |
class SoupLinkExtractor(object): | |
def __init__(self, *args, **kwargs): | |
super(SoupLinkExtractor, self).__init__() | |
allow_re = kwargs.get('allow', None) |
Some experiments, which worked but were eventually not used. | |
See http://www.greenhills.co.uk/2011/06/10/lxc.html | |
Now, the next big milestone is to get networking working. | |
In the config, we told lxc-create to use br0 as the link, | |
and inside the container we have eth0: | |
root@thunder:/# brctl show br0 | |
bridge name bridge id STP enabled interfaces | |
br0 8000.962e6bb72480 no vethP70LNx |
package 'debootstrap' | |
package 'apt-cacher-ng' | |
package 'inotify-tools' | |
include_recipe 'lxc::manage' | |
include_recipe 'lxc::network_bridge' | |
include_recipe 'lxc::dns' | |
host = node[:container] |
<!DOCTYPE html> | |
<html> | |
<!-- NOTES | |
Demo - uses IOS native scroll available in IOS5, but sidestep the document-bounce behavior. Tested on iPad 1, using IOS 5.1. | |
This approach uses a set of 3 nested divs. | |
OuterDiv -- fixed height, width, overflow-scrolling: touch; | |
MiddleDiv -- fixed height width, overflow-scrolling: touch; fits inside OuterDiv | |
InnerDiv -- fixed height width, bigger than MiddleDiv, so it kicks in the overflow behavior |
# | |
# Cookbook Name:: s3_backups | |
# Recipe:: default | |
# Author:: Todd Zusman (toddzusman.com) | |
# | |
execute "apt-get update" do | |
action :nothing | |
end |
# DO NOT RESPOND TO REQUESTS OTHER THAN yourdomain.com | |
server { | |
listen 80 default; | |
server_name _; | |
return 444; | |
} | |
# FILE UPLOADS | |
server { | |
listen 80; |
require 'formula' | |
class LibdnetPython <Formula | |
depends_on 'libdnet' | |
url 'http://libdnet.googlecode.com/files/libdnet-1.12.tgz' | |
homepage 'http://code.google.com/p/libdnet/' | |
sha1 '71302be302e84fc19b559e811951b5d600d976f8' | |
def install | |
ENV["CFLAGS"] = "-O3 -w -pipe" |