This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, urllib, httplib2, base64, json, re, time, paramiko | |
from operator import itemgetter | |
import pprint | |
headers = {} | |
cookie = '' | |
url_tail = '?api_version=1.0&format=js' | |
def create_url(method=None): | |
base_url = 'https://my.rightscale.com/api/acct/%s/' % account_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, subprocess, json, re | |
import pprint | |
def get_local_tags(): | |
# rs_tag_list_command = 'rs_tag --list | awk \'{print "\\""$2"\\","}\'' terrible | |
rs_tag_list_command = 'rs_tag --list | awk \'{print $2}\'' | |
p = subprocess.Popen(rs_tag_list_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) | |
output, errors = p.communicate() | |
return output.split() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import time | |
import pprint | |
import urllib2 | |
import urllib | |
from BeautifulSoup import BeautifulSoup as soup | |
from random import choice | |
def append_links(thumb_div): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import time | |
import random | |
import signal | |
import multiprocessing | |
processes = [] | |
def launch_process(number, kill_queue, child_connection): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
import time | |
import uuid | |
import random | |
import signal | |
import multiprocessing | |
import numpy | |
from optparse import OptionParser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class Manufacturer(models.Model): | |
uuid = models.CharField(max_length = 100) | |
name = models.CharField(max_length = 100) | |
class Car(models.Model): | |
uuid = models.CharField(max_length = 100) | |
manufacturer = models.ForeignKey(Manufacturer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" base58 encoding / decoding functions """ | |
import unittest | |
alphabet = '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' | |
base_count = len(alphabet) | |
def encode(num): | |
""" Returns num in a base58-encoded string """ | |
encode = '' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ostruct' | |
require 'optparse' | |
require 'awesome_print' | |
$stdout.sync = true | |
options = {} | |
OptionParser.new do |opts| | |
opts.banner = "Usage: change_phabricator_prefix.rb [options]" |
OlderNewer