Skip to content

Instantly share code, notes, and snippets.

View dekz's full-sized avatar
🐢
⠚⠁⠉⠕⠃

Jacob Evans dekz

🐢
⠚⠁⠉⠕⠃
View GitHub Profile
@dekz
dekz / chromium updater.py
Created June 12, 2009 06:02
Get latest Chromium for OSX from http://chromium.org
#!/usr/bin/env python
# Chromium Updater
# Download and install the newest Chromium build from http://chromium.org
# on Mac OS X.
import urllib2, os.path, sys
BASE_URL = 'http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/'
UPDATE_URL = 'http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/LATEST'
DOWNLOAD_PATH = os.path.expanduser('~/Downloads/Chromium Updater')
#!/usr/bin/ruby
#gem install json_ext
#gem uninstall json_pure
require 'rubygems'
require 'json'
require 'net/http'
function assert(code) {
if (typeof(code) === "string") {
if (!eval(code)) {
log("ASSERT FAILURE: '" + code + "'");
return false;
}
} else {
log("Assert failed: need string");
return false;
}
#!/bin/bash
mkdir /tmp/chromedownload && cd /tmp/chromedownload
curl http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/LATEST -o /tmp/chromedownload/LATEST --silent && LATEST=`cat /tmp/chromedownload/LATEST`
echo "Found latest.." $LATEST
curl http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/$LATEST/chrome-mac.zip -o /tmp/chromedownload/chrome-mac.zip --silent
echo "Download Complete.."
unzip -qq /tmp/chromedownload/chrome-mac.zip
cp -R /tmp/chromedownload/chrome-mac/Chromium.app /Applications
echo "Cleaning up.."
rm -rf /tmp/chromedownload
@dekz
dekz / nzbs
Created February 22, 2010 10:57
//http://nzbs.org/index.php?action=getnzb&nzbid=307942
function addToSABnzbdFromNZBORG() {
// Set the image to an in-progress image
var img = chrome.extension.getURL('images/sab2_16_fetching.png');
$(this).find('img').attr("src", img);
// Find the newzbin id from the href
var url = 'http://nzbs.org/'
var nzburl = url.concat($(this).attr('href'));
var addLink = this;
@dekz
dekz / cleanup
Created February 28, 2010 03:03
#!/usr/bin/env python
import os
import sys
import shutil
size = 0
def grem(path, list):
global size
for file in os.listdir(path):
if os.path.isdir(os.path.join(path, file)):
@dekz
dekz / morkon
Created February 28, 2010 07:29
#!/usr/bin/env python
#Check if rar files have been unrared, if so clean them up for space, if not unrared, do it and clean it
#requires unrar, use port or apt-get
import os
import sys
import subprocess
size = 0
def morkon(path, list):
global size
directory=path
#!/usr/bin/env python
import os
import sys
import subprocess
import fileinput
#htpasswd -b htaccess <name> <passwd>
count=0
def htaccessimport(file):
list boundingBoxes;
vector half_dim;
list painted;
vector root;
vector goal;
integer testGridIntersectsBoxes(vector grid_c, vector h_sizes, list BBoxes)
{
//Send the command
list command=["Command",llGetPos(),TRUE];
llMessageLinked(LINK_THIS, 0, llDumpList2String(command, "|"), "" );
//Retrieve the command
link_message(integer sender_num, integer num, string str, key id)
{
list args = llParseStringKeepNulls(str, ["|"], [] );
string cmd = llList2String(args, 0 );