Skip to content

Instantly share code, notes, and snippets.

@swdunlop
swdunlop / PKGBUILD
Created January 5, 2015 21:28
bin32-firefox 34.0 PKGBUILD
# Maintainer: c0nd0r <gcesarmza@gmail.com>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: webjdm <web.jdm@gmail.com>
# Contributor: Scott W. Dunlop <swdunlop@gmail.com>
pkgname=bin32-firefox
pkgver=34.0
pkgrel=1
pkgdesc="bin32-firefox for Arch x86_64 (en-US)"
arch=('x86_64')
@swdunlop
swdunlop / identifypanic.go
Created March 18, 2014 20:45
Identify a GOLANG Panic Function and Line in Recovery
// You can edit this code!
// Click here and start typing.
package main
import "fmt"
import "runtime"
import "strings"
func identifyPanic() string {
var name, file string
@swdunlop
swdunlop / PKGBUILD
Last active August 29, 2015 13:56
An Arch Linux PKGBUILD for Yara2, bastardized from the original Yara PKGBUILD on the AUR
# Maintainer: fnord0 <fnord0 AT riseup DOT net>
# Hacked by swdunlop for yara2 and removed spurious .install <swdunlop@gmail.com>
pkgname=('yara2')
pkgver=2.0.0
pkgrel=1
epoch=
pkgdesc="yara - A malware identification and classification tool"
arch=('x86' 'x86_64')
url="https://github.com/plusvic/yara/archive/v${pkgver}.tar.gz"
license=('APACHE')
@swdunlop
swdunlop / plyml.go
Last active October 21, 2021 00:23
PLYML is a simple utility to convert OSX plists to/from YAML to make them easier to hack on
/* plyml converts Apple plists into YAML, and vice-versa. This is used to make it easier to hack on TextMate and Sublime Text themes. It depends on Apple's "plutil" utility, meaning it is only useful on OSX. */
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"launchpad.net/goyaml"
"os"
"os/exec"
@swdunlop
swdunlop / Makefile
Last active March 28, 2017 19:29
Enabling SSH (and static password) at boot in a Finnix ISO for remote boot
FINNIX_VERSION ?= 108
FINNIX_URL ?= http://www.finnix.org/releases/$(FINNIX_VERSION)/finnix-$(FINNIX_VERSION).iso
FINNIX_ISO = src/finnix-$(FINNIX_VERSION).iso
SSH_ISO ?= finnix-$(FINNIX_VERSION)-ssh.iso
SSH_PASSWORD ?= applypasswordhereplease
BOOT_KERNEL ?= boot/x86/linux
BOOT_INITRD ?= boot/x86/initrd.xz
BOOT_VGA ?= normal
@swdunlop
swdunlop / PKGBUILD
Created May 28, 2013 17:15
Updated PKGBUILD for jq-git
# Maintainer: Alex Chamberlain <alex@alexchamberlain.co.uk>
name=jq
pkgname=$name-git
pkgver=1.1
pkgrel=3
epoch=
pkgdesc="Command-line JSON processor"
arch=('i686' 'x86_64')
url="http://stedolan.github.com/jq/"
license=('custom')
@swdunlop
swdunlop / scandump.go
Created December 4, 2012 18:44
Dumps Go text/scanner tokens to stdout as JSON
package main
import (
"encoding/json"
"os"
"text/scanner"
)
type Token struct {
Position scanner.Position `json:"pos"`
@swdunlop
swdunlop / xant
Created November 4, 2011 19:26
Runs Apache's ANT, suppressing all errors except compile output. For use with XCode 4
#!/usr/bin/env python
import sys
import re
import subprocess
RULES = [
#'[javac] foo.java:6: cannot find symbol'
[r'^ *\[javac\] ([^:]+:[^:]):(.*)$', '{0}: {1}'],
]
@swdunlop
swdunlop / navi.coffee
Created July 4, 2011 00:17
Sample of some CoffeeScript from AndBug's Navi utility
layout_local = (k, v) ->
$('<div class="local">k = v</div>').text("#{k} = #{v}")
layout_frame = (f) ->
div = $('<div class="frame"></div>')
div.append($('<h3></h3>').text("Frame: " + f[0]))
div.addClass('native') if f[2]
div.append(layout_local l[0], l[1]) for l in f[2..]
div.hide()
return div
@swdunlop
swdunlop / wall.coffee
Created June 22, 2011 19:25
A Coffeescript Message Wall With Long Poll Properties in Node.JS and Express
# our application server
app = require('express').createServer()
app.msgs = [] # a history of posted messages
app.defers = [] # a list of deferred responses
# / redirects to /q
app.get '/', (req, res) =>
res.redirect('/q')
# /q[/<xxx>] query messages from the wall; may block for a protracted period