Skip to content

Instantly share code, notes, and snippets.

@gardner
gardner / -
Created October 2, 2014 21:24
542db2726a90e8042e1270ae
@gardner
gardner / -
Created October 2, 2014 21:54
testing/Helpers/GDashApi.mm
@gardner
gardner / clamav-mac.md
Last active March 5, 2021 23:05
Get ClamAV running on Mac OS X (using Homebrew)

Get ClamAV running on Mac OS X (using Homebrew)

The easiest way to get the ClamAV package is using Homebrew

$ brew install clamav

Before trying to start the clamd process, you'll need a copy of the ClamAV databases.

Create a freshclam.conf file and configure as so

@gardner
gardner / check_connection
Created November 3, 2015 13:23
OpenWrt cron job to check the connection and, if there is no connection, reboot the Huawei E3272 modem using the hilink api.
#!/bin/ash
# OpenWrt cron job to check the connection and, if there is no connection,
# reboot the Huawei E3272 modem using the hilink api. This script is optimized
# for busybox and written in ash.
# Put this script in /bin/check_connection and then: chmod +x /bin/check_connection
# Then: crontab -e
# */15 * * * * /bin/check_connection > /tmp/reboot_con.log 2>&1
f="/tmp/reboot_lock"
if [ ! -f "$f" ]; then
@gardner
gardner / vagrant_2_usb.sh
Last active April 5, 2016 02:07
Turn VirtualBox disk into a bootable usb
cd ~/.vagrant.d/boxes/eda-VAGRANTSLASH-phase-zero/1.0.0/virtualbox
VBoxManage clonehd box-disk1.vmdk eda.img --format RAW
diskutil list
# USB_BLOCK_DEVICE=/dev/rdisk2
diskutil unmountDisk $USB_BLOCK_DEVICE
sudo dd if=eda.img of=$USB_BLOCK_DEVICE bs=16m
@gardner
gardner / poop.css
Created March 31, 2016 21:43
poops as bullet points for your list items
ul {
list-style: none;
padding: 0px;
}
li:before {
content: "\1F4A9";
margin: 0 1em;
}
@gardner
gardner / robin.js
Created April 1, 2016 18:53
auto click grow
window.jQuery || document.write('<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"><\/script>');
window.onload=function(){
setInterval(function() {
if ($('button.robin-chat--vote.robin-chat--vote-increase.robin--vote-class--increase.robin--active').text() != 'grow') {
$('#robinVoteWidget > div > button.robin-chat--vote.robin-chat--vote-increase.robin--vote-class--increase > span.robin-chat--vote-label').click();
console.log('click click')
}
} , 60000);
};
@gardner
gardner / filter.js
Last active April 1, 2016 19:11
filter out the jerks
$("#robinChatMessageList").bind("DOMSubtreeModified", function() {
$( ".robin--username:contains(Antrix_of_Hate)" ).parent().hide()
$( ".robin--username:contains(keepfrgettngmypsswrd)" ).parent().hide()
});
people
history
way
art
world
information
map
two
family
government
@gardner
gardner / boom.sh
Created April 24, 2016 23:55
I got a phishing email today. This fills up the attackers database with junk.
#!/bin/bash
## First download the data files
if [ ! -f 10k_most_common.txt ]; then
curl -O 'https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/10k_most_common.txt' -H 'Pragma: no-cache' -H 'DNT: 1' -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Accept-Language: en-US,en;q=0.8,es;q=0.6' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Cache-Control: no-cache' -H 'Referer: https://github.com/danielmiessler/SecLists/blob/master/Passwords/10k_most_common.txt' -H 'Connection: keep-alive' --compressed
fi
if [ ! -f nouns.txt ]; then
curl -O 'https://gist.githubusercontent.com/gardner/25d36eea91523d5a30d3e5197c6cc2b3/raw/a42ac049336b388674ecd1f1f37dd2f0cbd02ae7/nouns.txt' -H 'Pragma: no-cache' -H 'DNT: 1' -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Accept-Language: en-US,en;q