Skip to content

Instantly share code, notes, and snippets.

View nevali's full-sized avatar
🏳️‍🌈
Always, always busy

Mo McRoberts nevali

🏳️‍🌈
Always, always busy
View GitHub Profile
#! /bin/sh
prefix=/opt/mysql5
pkg=mysql-5.1.37
base=`pwd`
sdk=/Developer/SDKs/MacOSX10.5.sdk
gccbin="/Developer/usr/bin"
gccsuffix="-4.0"
build=`uname -p`-apple-darwin`uname -r`
archlist="ppc ppc64 i386 x86_64"
## The below assumes you have SetTerminalStyle in $HOME/Tools
## Grab it from: http://blog.omnigroup.com/2007/11/03/terminal-scripting-in-105/
dossh() {
host=""
defstyle="My default settings"
for i ; do
case "$i" in
-*)
;;
• In Network Preferences, create a ZTEUSBModem port, if one doesn’t already exist
• Hit Advanced and change the Vendor to “Other” and Model to “3Connect Modem Script”
• Back in the main port config, set the Telephone Number to *99# and leave the account name and password blank.
Save all your changes and you should be able to connect. Last time I tried it I was on a train between Edinburgh and Glasgow, so I couldn’t tell if it was flaky because of signal or if I’d done something wrong!
# Target CPU
TARGET_CPU_PPC = 0
TARGET_CPU_PPC64 = 0
TARGET_CPU_68K = 0
TARGET_CPU_X86 = 0
TARGET_CPU_X86_64 = 1
TARGET_CPU_ARM = 0
TARGET_CPU_MIPS = 0
TARGET_CPU_SPARC = 0
TARGET_CPU_ALPHA = 0
@nevali
nevali / Notes.txt
Created October 2, 2009 22:51
All of this so that I have some realistic test data…
This information is pieced together from a combination of the /programmes RDF and the TV-Anytime metadata published by backstage.
If I could be bothered, I’d tweak the script to show whether each programme is available on iPlayer currently or not.
The pids are for the versions. The broadcast pids aren't published, as far as I can tell, so I can only pin it down as far as version.
The crids and dvb:// URLs are from the backstage data but some major caveats:
1. I've got a sneaking feeling the crids:// don't match what bounces between PIPS and BDS, so I'm not sure how they come to exist.
2. The high 16 bits of the crid match the service ID component of the dvb:// URL (in this case, 1044 [hex]). The low 16 bits _usually_ match the dvb:// event ID too, but this breaks on repeat broadcasts.
<!-- Where #login-auth is your password field and #login-iri is your username. Change as appropriate -->
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#login-auth').chromaHash({bars: 3});
$('#login-iri').focus();
var i;
i = setInterval(function() {
if(($('#login-auth').val()))
{
clearInterval(i);
@nevali
nevali / NSObject.php
Created January 6, 2010 23:18
NSObject in PHP
<?php
/* Note that this code makes use of late static binding, introduced in
* PHP 5.3.
*
* This is basically one great big dirty hack for curiosity’s sake.
*/
class NSObject
{
@nevali
nevali / extract.php
Created January 19, 2010 13:51
Return an array containing all text delimited by $start and $end
<?php
/* Return an array containing all text delimited by $start and $end */
function str_extract($source, $start, $end)
{
$matches = array();
$ofs = 0;
$sl = strlen($start);
$el = strlen($end);
$l = strlen($source);
@nevali
nevali / gist:322730
Created March 5, 2010 13:48
Eregansu deployment prototype post-receive hook
#!/bin/sh
## Setup is basically thus:
##
## On your server:
##
## $ mkdir production.git /path/to/website
## $ cd production.git
## $ git init --bare
## $ git config core.worktree /path/to/website
cd /Library/Application\ Support/VMware\ Fusion/isoimages
mkdir backup
mv *.sig darwin.iso backup/
perl -n -p -e 's/ServerVersion.plist/SystemVersion.plist/g' < backup/darwin.iso > darwin.iso
openssl genrsa -out tools-priv.pem 2048
openssl rsa -in tools-priv.pem -pubout -out tools-key.pub
for i in *.iso ; do openssl dgst -sha1 -sign tools-priv.pem < $i > $i.sig ; done