Skip to content

Instantly share code, notes, and snippets.

Avatar
🎿
NOP Sledding

Jameel Haffejee RC1140

🎿
NOP Sledding
View GitHub Profile
@adharris
adharris / postgres_array.go
Created Nov 28, 2012
PostgreSQL demo of Array types using Golang
View postgres_array.go
package main
import (
"database/sql"
"errors"
"fmt"
_ "github.com/bmizerany/pq"
"os"
"regexp"
"strings"
@jasonrudolph
jasonrudolph / about.md
Last active Oct 27, 2020
Programming Achievements: How to Level Up as a Developer
View about.md
@Rurik
Rurik / asm_find_math.py
Last active Oct 13, 2020
Detect subroutines that may have encryption/encoding routines by finding XOR and shift routines.
View asm_find_math.py
# Automatically find XOR/SHL/SHR routines from an executable
# Uses IDAW (text IDA)
# @bbaskin - brian @ thebaskins.com
# While other, more powerful scripts like FindCrypt find known
# algorithms this is used to find custom encoding or modified
# encryption routines
"""
Script results:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
View gist:389875
import re
# http://atomboy.isa-geek.com/plone/Members/acoil/programing/double-metaphone
from metaphone import dm as double_metaphone
# get the Redis connection
from jellybean.core import redis
import models
# Words which should not be indexed
@jpetitcolas
jpetitcolas / parsing-binary-file.go
Last active Jul 27, 2020
How to parse a binary file in Go? Snippet based on MoPaQ SC2 replay parsing. Related blog post: http://www.jonathan-petitcolas.com/2014/09/25/parsing-binary-files-in-go.html
View parsing-binary-file.go
package main
import (
"bytes"
"encoding/binary"
"fmt"
"log"
"os"
)
@johanndt
johanndt / upgrade-postgres-9.3-to-9.5.md
Last active Jul 6, 2020 — forked from dideler/upgrade-postgres-9.3-to-9.4.md
Upgrading PostgreSQL from 9.3 to 9.5 on Ubuntu
View upgrade-postgres-9.3-to-9.5.md

TL;DR

Install Postgres 9.5, and then:

sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main
View gist:6e78d03810548b4867d6
/*
* Qualys test program to check for presence of GHOST vulnerability
* For more info: http://www.openwall.com/lists/oss-security/2015/01/27/9
*/
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
@nblumoe
nblumoe / vim_fireplace_paredit_cheat_sheet.md
Created Apr 24, 2013
Simple cheat sheet for vim fireplace and paredit
View vim_fireplace_paredit_cheat_sheet.md

fireplace

  • cpr => (require ... :reload)
  • cpR => (require ... :reload-all)

Evaluation

  • :Eval (clojure code) => runs (clojure code) in repl
  • cpp => evaluate inn-most expessions under cursor
  • cp<movement> => evaluate text described by <movement>
  • cqp => opens quasi-repl
  • cqc => quasi-repl command line window
@joeyAghion
joeyAghion / simple_redis_profile.rb
Created Oct 13, 2010
By sampling keys from your redis databases, this script tries to identify what types of keys are occupying the most memory.
View simple_redis_profile.rb
#!/usr/bin/env ruby
# Evaluates a sample of keys/values from each redis database, computing statistics for each key pattern:
# keys: number of keys matching the given pattern
# size: approximation of the associated memory occupied (based on size/length of value)
# percent: the proportion of this 'size' relative to the sample's total
#
# Copyright Weplay, Inc. 2010. Available for use under the MIT license.
@koreno
koreno / README.md
Last active Apr 1, 2020
'rebaser' improves on 'git rebase -i' by adding information per commit regarding which files it touched.
View README.md

Prebase

git-prebase improves on 'git rebase -i' by adding information per commit regarding which files it touched.

  • Each file gets an alpha-numeric identifier at a particular column, a list of which appears below the commit list. (The identifiers wrap around after the 62nd file)
  • Commits can be moved up and down safely (without conflicts) as long as their columns don't clash (they did not touch the same file).

Installation

Add the executable to your path and git will automatically expose it as