Skip to content

Instantly share code, notes, and snippets.

View jas-'s full-sized avatar
🏃‍♂️

Jason Gerfen jas-

🏃‍♂️
View GitHub Profile
@jas-
jas- / .bashrc
Last active September 27, 2015 23:48
Hardening stuff
# Hostname
h=`hostname`
# Command to read input & mask it
cmd='read -sp "Enter password: " pass'
# Path to aide integrity tool
a="/usr/bin/aide"
# Path to aide policy database
adb="/var/lib/aide"
@jas-
jas- / jQuery.blank.js
Last active September 27, 2015 17:08
jQuery method plug-in framework
(function($){
$.fn.tool = function(method) {
var defaults = defaults || {
foo: 'bar'
};
var methods = methods || {
init: function(opts) {
@jas-
jas- / 4GBISO
Last active February 17, 2024 10:44
4.0GB Empty ISO
dd if=/dev/zero of=file.iso bs=516096 seek=9182 count=0
@jas-
jas- / _salt()
Created June 21, 2011 16:22
PHP salter
function _salt($string, $len=null)
{
return (!empty($len)) ?
hash('sha512', str_pad($string, (strlen($string) + $len),
substr(hash('sha512', $string),
round((float)strlen($string)/3, 0,
PHP_ROUND_HALF_UP),
($len - strlen($string))),
STR_PAD_BOTH)) :
hash('sha512', substr($string,