Skip to content

Instantly share code, notes, and snippets.

@mattkasun
mattkasun / wg-watchdog.sh
Created October 31, 2020 13:50
wireguard watchdog script
#!/bin/bash
tries=0
while [[ $tries -lt 3 ]]
do
if /bin/ping -c 1 10.200.200.1
then
# echo "wg working"
logger -n winterfell -i -t "wg-watchdog" -p user.notice "wireguard working"
exit 0
@gretzky
gretzky / pihole + openvpn
Created June 7, 2018 00:34
installing pihole and openvpn on 1 raspberry pi
############################################
setting up pihole + pivpn on 1 raspberry pi
for fun and profit (and privacy)
############################################
#################
# what you need #
#################
# - 1 raspberry pi
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active March 12, 2024 22:46
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
@olih
olih / jq-cheetsheet.md
Last active May 15, 2024 22:26
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

anonymous
anonymous / readme.txt
Created April 17, 2014 14:51
title
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@mo6020
mo6020 / ucs_serialcollector.ps1
Created April 2, 2014 15:27
Pull UCS serial numbers
##################################################
# Joe Martin
# Cisco Systems, Inc.
# UCS Serial Number Collector v0.8
# 3/10/13
#
# Code provided as-is. No warranty implied or included.
# This code is for example use only and not for production
#
# This script will create an excel file of all UCSM based
@willurd
willurd / web-servers.md
Last active May 25, 2024 13:16
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000