python ghclone.py
Follow the prompts
Notes
| # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or | |
| # /usr/share/doc/ifupdown/examples for more information. | |
| # The loopback network interface | |
| auto lo | |
| iface lo inet loopback | |
| # The primary network interface | |
| # Uncomment this and configure after the system has booted for the first time | |
| auto eth0 | |
| iface eth0 inet static |
| #!/bin/bash | |
| VENV=$1 | |
| if [ -z $VENV ]; then | |
| echo "usage: runinenv [virtualenv_path] CMDS" | |
| exit 1 | |
| fi | |
| . ${VENV}/bin/activate | |
| shift 1 | |
| echo "Executing $@ in ${VENV}" | |
| exec "$@" |
| <?php | |
| private function set_password($raw_password) { | |
| /* | |
| Sets the password to a string of random sha1 salt | |
| and encrypted password. | |
| Separated by '$' | |
| */ | |
| $salt = substr(sha1(genRandomString().genRandomString()), 0, 5); | |
| $hash = sha1($salt.$raw_password); |
| require 'sinatra' | |
| require 'redis' | |
| require 'json' | |
| require 'date' | |
| class String | |
| def &(str) | |
| result = '' | |
| result.force_encoding("BINARY") |
| #!/usr/bin/env python | |
| # -*- coding: iso-8859-15 -*- | |
| from tastypie.resources import ModelResource | |
| class SpineFrontedResource(ModelResource): | |
| """A base model resource for spine-fronted models. | |
| * Bins the 'id' that spine sends. | |
| * Removes 'meta' from the list, returns only objects. |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
| # 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. |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| class AttrDict(dict): | |
| def __init__(self, arg=(), **kwargs): | |
| items = arg.items() if isinstance(arg, (dict, )) else arg | |
| for key, value in items: | |
| self[key] = self.fromdict(value) | |
| for key, value in kwargs.items(): | |
| self[key] = self.fromdict(value) |
| package main | |
| import ( | |
| "crypto/tls" | |
| "crypto/x509" | |
| "log" | |
| "net/rpc" | |
| ) | |
| func main() { |