Skip to content

Instantly share code, notes, and snippets.

@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 <[email protected]>
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 / 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
Created January 5, 2015 21:28
bin32-firefox 34.0 PKGBUILD
# Maintainer: c0nd0r <[email protected]>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: webjdm <[email protected]>
# Contributor: Scott W. Dunlop <[email protected]>
pkgname=bin32-firefox
pkgver=34.0
pkgrel=1
pkgdesc="bin32-firefox for Arch x86_64 (en-US)"
arch=('x86_64')
@swdunlop
swdunlop / factor-git.diff
Created March 28, 2016 17:01
A patch for updating factor-git pkgbuild to work as of 2016-03-28
diff --git a/PKGBUILD b/PKGBUILD
index cfb5e4b..b2f3b03 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
# Contributor: Leonidas <[email protected]>
pkgname=factor-git
_pkgname=factor
-pkgver=0.96.1139.g3a9f4ed
+pkgver=0.96.3482.g676168c
@swdunlop
swdunlop / iterm
Last active March 27, 2018 19:12
Split the Current iTerm2 Session to Run a Command
#!/usr/bin/osascript
on run argv
tell application "iTerm2"
tell current session of current window
set view to split horizontally with default profile command "sh -c " & (quoted form of item 1 of argv)
select view
end tell
end tell
end run
@swdunlop
swdunlop / fzf.fish
Created November 15, 2018 22:25
A few Fish functions for browsing files using FZF, Highlight and RipGrep
#!/usr/bin/env fish
function fzf-files
fzf \
--header 'Enter to open in Sublime, ctrl-y to copy path' \
--bind 'enter:execute-silent:subl {}' \
--bind 'ctrl-y:execute-silent:echo {} | pbcopy' \
--preview 'highlight -O xterm256 -s darkbone -l {} 2>/dev/null ||
cat {}'
end
@swdunlop
swdunlop / default.nix
Created December 18, 2018 18:14
Packaging saml2aws for Nix
# to install:
# nix-env -f default.nix -i
with import <nixpkgs> {};
buildGoPackage rec {
name = "saml2aws-${version}";
meta = {
description = "CLI tool which enables you to login and retrieve AWS temporary credentials using a SAML IDP";
homepage = "https://github.com/Versent/saml2aws";
license = lib.licenses.mit;
};
@swdunlop
swdunlop / kasugano.itermcolors
Created January 20, 2019 19:32
Kasugano Colors for ITerm
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.23828125</real>
@swdunlop
swdunlop / kasugano.sublime-color-scheme
Last active April 29, 2019 20:59
Kasugano Colors for Sublime Text 3
// scope reference: https://www.sublimetext.com/docs/3/scope_naming.html
{ "name": "Kasugano Color Scheme"
, "variables":
{ "comment": "#707070"
, "keyword": "#95A7CC"
, "entity": "#EDEFF2"
, "invalid": "#899AFF"
, "reserved": "#7882BF"
, "constant": "#899AFF"
, "string": "#98C9BB"
@swdunlop
swdunlop / main.go
Created November 28, 2019 05:45
Simple Time Server Using GQLGen
package main
import (
"context"
"net/http"
"strings"
"time"
"github.com/99designs/gqlgen/handler"
)