Skip to content

Instantly share code, notes, and snippets.

View foxx's full-sized avatar

Cal Leeming foxx

View GitHub Profile
@bradland
bradland / ssh-known-hosts-mgmt.sh
Last active April 4, 2023 21:21
SSH known_hosts tools
# This is a short collection of tools that are useful for managing your
# known_hosts file. In this case, I'm using the '-f' flag to specify the
# global known_hosts file because I'll be adding many deploy users on this
# system. Simply omit the -f flag to operate on ~/.ssh/known_hosts
# Add entry for host
ssh-keyscan -H github.com >> /etc/ssh/ssh_known_hosts
# Scan known hosts
ssh-keygen -f /etc/ssh/ssh_known_hosts -F github.com
@samuraisam
samuraisam / parse_accept.py
Created May 16, 2012 21:43
Parse an accept header in Python w/ support for vendor types
# The author disclaims copyright to this source code. In place of a legal
# notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
# It is based on a snipped found in this project:
# https://github.com/martinblech/mimerender
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 2, 2024 03:13
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@klovadis
klovadis / gist:5170446
Created March 15, 2013 14:59
Two Lua scripts for Redis to turn HGETALL and HMGET into dictionary tables
-- gets all fields from a hash as a dictionary
local hgetall = function (key)
local bulk = redis.call('HGETALL', key)
local result = {}
local nextkey
for i, v in ipairs(bulk) do
if i % 2 == 1 then
nextkey = v
else
result[nextkey] = v
@jessepeterson
jessepeterson / convert-emlx.py
Last active December 15, 2015 01:29
Convert an Apple emlx file to a .eml file (removing the Apple-proprietary parts; leaving a raw message file)
import sys
for i in sys.argv[1:]:
if i.lower().endswith('emlx'):
print 'Processing:', i
else:
print 'Unknown file:', i
sys.exit(1)
emlx = open(i, 'r')
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 4, 2024 21:33
A badass list of frontend development resources I collected over time.
@janich
janich / exportMysqlUsers.php
Created July 31, 2013 13:02
Export MySQL users and permissions
<?php
/**
* Export MySQL users and permissions
*
* This script exports raw CREATE USER and GRANT queries of a given database
* to help migrate MySQL users and permissions to a new server.
* Users will keep their passwords across the migration.
*
* Warning: The import queries expects exactly the same database structure!
*
@callumacrae
callumacrae / build-tools.md
Last active October 25, 2023 15:14
Build tools written in JavaScript
@0x27
0x27 / misfortunecookie.py
Last active January 20, 2017 05:05
checks for misfortune cookie vuln
#!/usr/bin/python2
# coding: utf-8
# misfortune cookie probe
# ~ skyhighatrist
import requests
import sys
def check(ip):
print "{+} Probing %s for the Misfortune Cookie Vuln..." %(ip)
url = "http://%s:7547/lol" %(ip) # /lol will never exist so it makes a good canary
@drmpeg
drmpeg / gr-paint.md
Last active December 9, 2023 20:11
How to create high quality gr-paint images.

High Quality Spectrum Painting

A quick tutorial on how to get high quality images from gr-paint and Gqrx.

Spectrum Example

Setup

  • Use a newer version of Gqrx with Ref. level and dB range sliders.
  • Set the FFT size in Gqrx to 32768