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. |
# 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() { |
// returns items that are not restaurants and nf_serving_weight_grams is not null
// includes usda_fields in the results so items that contain those fields will return
// fields.usda_fields
{
"fields":["item_name","brand_name","keywords","usda_fields"],
"query":"celery",