Skip to content

Instantly share code, notes, and snippets.

View zg's full-sized avatar

Zack Zatkin-Gold zg

View GitHub Profile
@zg
zg / class.db.php
Created July 22, 2011 06:59
db class
<?php
/*********************************************************************
* Database Abstraction Layer
**********************************************************************
* Related Files:
* --------------------------------------------------------------
**********************************************************************
* Revision History:
* --------------------------------------------------------------
@zg
zg / class.Highscores.php
Created July 22, 2011 06:59
Highscores class
<?php
class Highscores {
public $skills = array (
'attack','defence','strength','hitpoints','range',
'prayer','magic','cooking','woodcutting','fletching',
'fishing','firemaking','crafting','smithing','mining',
'herblore','agility','thieving','slayer','farming',
'runecraft',
'overall'
);
@zg
zg / npc-xml.php
Created July 22, 2011 06:59
Something to do with NPCs and XML...
<?php
if(count($_GET) > 0)
{
$xmlstr = "<npcspawn>
<npcId>{$_GET['npcId']}</npcId>
<locationz>
<x>{$_GET['x']}</x>
<y>{$_GET['y']}</y>
<z>{$_GET['z']}</z>
</locationz>
@zg
zg / database.php
Created July 22, 2011 06:59
Login/Register
<?php
//require this to get a database connection
$connect = mysql_connect('localhost','test','test');
mysql_select_db('test');
?>
@zg
zg / tmux.md
Created December 6, 2013 01:05 — forked from andreyvit/tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@zg
zg / arch-xhyve.sh
Created May 13, 2016 21:14 — forked from lloeki/arch-xhyve.sh
Run Arch Linux in xhyve
#!/bin/bash
tmp=$(mktemp -d)
pushd "$tmp"
iso=/Users/lloeki/Downloads/archlinux-2015.08.01-dual.iso
echo "fixing disk"
dd if=/dev/zero bs=2k count=1 of=tmp.iso
dd if=$iso bs=2k skip=1 >> tmp.iso
echo "mounting disk"
@zg
zg / debian-xhyve.sh
Created May 13, 2016 21:15 — forked from lloeki/debian-xhyve.sh
Running debian 8.1 in xhyve
#!/bin/bash
# unfortunately debian currently panics in xhyve
tmp=$(mktemp -d)
pushd "$tmp"
iso="$HOME"/Downloads/debian-8.1.0-amd64-netinst.iso
#iso="$HOME"/Downloads/debian-8.1.0-i386-netinst.iso
echo "fixing disk"
dd if=/dev/zero bs=2k count=1 of=tmp.iso