Skip to content

Instantly share code, notes, and snippets.

View sjoness's full-sized avatar

Sam Jones sjoness

View GitHub Profile
; Executable name : EATSYSCALL
; Version : 1.0
; Created date : 06/02/2013
; Last update : 06/02/2013
; Author : Sam Jones
; Description : A simple assembly app for Linux, using NASM 2.05,
; demonstrating the use of Linux INT 80H syscalls
; to display text.
;
; Build using these commands:
# sys module lets you do sys.exit() - quit a program early
# random module lets you use the random functions
import random
import sys
# just to keep things simple and help you focus on the if...elif...else structure
# if you run within IDLE don't worry about the traceback on sys.exit() - won't happen when you run
# through DOS
# procedures go here
def gameoverearly():
module Main where
import System.IO
-- Extended exercise: supermarket billing
-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-- Types of names, prices (pence) and bar-codes.
type Name = String
(defgroup snippt-paste nil
"Interface to s.drk.sc"
:tag "snippt"
:group 'applications)
(defcustom *snippt-timeout* 10
"The time to wait for a request."
:type 'integer :group 'pastie)
@sjoness
sjoness / wifi
Created September 22, 2012 16:01
/etc/network.d/wifi - arch netcfg
CONNECTION='wireless'
DESCRIPTION='BTHub'
INTERFACE='wlan0'
SECURITY='wpa'
ESSID='BTHub3-QJQ3'
KEY='*'
IP='static'
ADDR='192.168.1.32'
GATEWAY='192.168.1.254'
DNS=('192.168.1.254')
@sjoness
sjoness / sjoness.zsh-theme
Last active October 8, 2015 01:48
zsh-theme
# zsh theme
# created by Sam Jones 04/08/2012
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[red]%}|%{$fg[white]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}]"
ZSH_THEME_GIT_PROMPT_DIRTY=" ↯"
ZSH_THEME_GIT_PROMPT_CLEAN=""
PROMPT='%{$fg[red]%}[%1~]%{$reset_color%}%{$reset_color%}%{$fg[white]%}$(git_prompt_info) « $reset_color%}'
@sjoness
sjoness / .global_ignore
Created July 20, 2012 10:56
run `git config --global core.excludesfile ~/.global_ignore`
## Vim
.*.sw[a-z]
*.un~
Session.vim
## OS X
.DS_Store
# Thumbnails
._*
@sjoness
sjoness / example.conf
Created October 18, 2011 11:26
nginx sites-enabled example conf
server {
listen 80;
server_name qntm.net;
location / {
root /srv/http/qntm;
index index.html index.htm;
}
error_page 404 /404/index.html;