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
@nevali
nevali / minisapserver-0.3.6-customsdp.diff
Created April 16, 2009 07:37
A patch against VideoLAN's miniSAPServer to allow custom SDP announcements
diff -ruN minisapserver-0.3.6/message.cpp minisapserver-0.3.6-customsdp/message.cpp
--- minisapserver-0.3.6/message.cpp 2009-01-11 19:53:25.000000000 +0000
+++ minisapserver-0.3.6-customsdp/message.cpp 2009-04-15 00:21:19.000000000 +0100
@@ -96,59 +96,65 @@
bool Message::AddProgram(Program *p)
{
+ string sdp = "v=0\r\n"; // SDP version
/* FIXME */
/* RFC 2327 Compliance ? */
@nevali
nevali / 64-bit-wtf.c
Created May 22, 2009 15:31
int64_to_base36
char *
int64_to_base36(uint32_t src, char *buf)
{
const char base36[] = "0123456789abcdefghijklmnopqrstuvwxyz";
int c;
c = 0;
while(src)
{
fprintf(stderr, "%02d: src = 0x%016x (%llu), r = %d\n", c, src, src, src % 36);
@nevali
nevali / dbcore.php
Created June 28, 2009 11:26
Early version of Eregansu’s DBCore
<?php
/* Copyright 2009 Mo McRoberts.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
@nevali
nevali / uploadResizeCrop.php
Created July 16, 2009 13:10
Quick image resizing script
<?php
ini_set("memory_limit", "128M");
$target_path = 'full/';
$thumb_path = 'thumbs/';
$formats = array('jpg', 'gif', 'png');
/* Grab the extension of the uploaded file, and sanitise the rest of the
1. Reboot
2. Hold down Cmd + S until a black screen with white text appears.
3. When you get to a shell prompt, enter the following:
mount -uw /
rm /var/db/.AppleSetupDone
shutdown -h now
4. After rebooting you should have a brand new admin account. When you login as the new admin you can simply delete the old one.
#! /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"
--- Makefile.in.orig 2009-08-03 18:45:31.000000000 +0100
+++ Makefile.in 2009-08-03 18:47:04.000000000 +0100
@@ -404,14 +404,10 @@
EXTRA_DIST = INSTALL-SOURCE INSTALL-WIN-SOURCE \
README COPYING EXCEPTIONS-CLIENT CMakeLists.txt
-SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
- @readline_topdir@ sql-common scripts \
+SUBDIRS = . include @zlib_dir@ \
+ @readline_topdir@ sql-common scripts \
## 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