Skip to content

Instantly share code, notes, and snippets.

View djeraseit's full-sized avatar
🎯
Focusing

Theodis Butler djeraseit

🎯
Focusing
View GitHub Profile
@W-Floyd
W-Floyd / zero_strip.sh
Created April 12, 2018 01:28
A one-liner sed expression to nicely strip leading and trailing 0's from each line of piped input
################################################################################
# ... | __zero_strip
################################################################################
#
# Zero Strip
#
# A one-liner sed expression to nicely strip leading and trailing 0's from each
# line of piped input.
#
# For example:
@Sanix-Darker
Sanix-Darker / Create_your_free_onion_website_on_Tor_network.sh
Last active November 3, 2024 09:28
Create your free onion website on Tor network
#Creating an .onion service in the Tor network is as simple as editing /etc/tor/torrc and adding:
HiddenServiceDir /var/lib/tor/www_service/
HiddenServicePort 80 127.0.0.1:80
# After restarting the tor service with
sudo service tor restart
# or
sudo service tor reload
# The directory will be created automagically, and inside the new directory, two files are generated, hostname and private_key.
@ryantuck
ryantuck / gpg_test.py
Last active April 30, 2024 23:44
working example of using gnupg in python
# install:
# pip3 install python-gnupg
# note - gpg needs to be installed first:
# brew install gpg
# apt install gpg
# you may need to also:
# export GPG_TTY=$(tty)
@W-Floyd
W-Floyd / tunnelbroker-net.sh
Last active August 28, 2021 22:34 — forked from pklaus/tunnelbroker-net.sh
tunnelbroker.net automatic tunnel IP update and tunnel setup (on Linux)
#!/bin/bash
# This script is published by Philipp Klaus <[email protected]>
# on <http://blog.philippklaus.de/2011/05/ipv6-6in4-tunnel-via-hurricane-electric-tunnelbroker-net-automatic-ip-update-on-mac-os-x/>
# It is originally by freese60 and modified by limemonkey.
# Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0>
# Further modified by pklaus, at <https://gist.github.com/pklaus/960672>
# Forked and mostly replaced by W-Floyd, <https://gist.github.com/W-Floyd/20a4c16ceb1e008cb995b7ff7dcc0a2a>
###############################################################################
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Python Spintax parser
This module provides an efficient spintax parser where every possible spuns have the same probability.
Given a masterspin you can get the total number of possible spuns or a randomly chosen spun.
"""
@vmassuchetto
vmassuchetto / remote-mysqldump.sh
Created July 4, 2017 15:14
Run mysqldump remotely via SSH to create local SQL dumps
#!/bin/bash
usage() {
echo ""
echo "USAGE:"
echo ""
echo " $0 [ OPTIONS and PARAMETERS ]"
echo ""
echo "OPTIONS:"
echo ""
@alexellis
alexellis / HackingOnLiveStreaming.md
Created June 1, 2017 12:48
HackingOnLiveStreaming

Additional notes

Original blog post - http://blog.alexellis.io/live-stream-with-docker/

How do I rebuild the image from scratch?

This will take several hours on a Raspberry Pi Zero - but less time on a Pi 2 or Pi 3. You can edit the Dockerfile for a Pi 2/3 and change RUN make to RUN make -j 4 to take advantage of the quad-core processor.

$ git clone https://github.com/alexellis/raspberrypi-youtube-streaming/
#! /usr/sbin/dtrace -C -s
/*
requirement: disable SIP
*/
#pragma D option quiet
BEGIN {
printf("vm_kernel_slide: 0x%p\n", (`vm_kernel_slide));
printf("vm_kernel_base: 0x%p\n", (`vm_kernel_base));
@jas-
jas- / .bashrc
Last active July 8, 2017 14:07
Parse UFW log
# Default path of UFW parser
parse_ufw=/path/to/parse-ufw.awk
# Default path of UFW log
log_ufw=/var/log/ufw.log
# Function for filtering outbound comms
function ufw_out
{
@alfredkrohmer
alfredkrohmer / list-user-installed-packages.sh
Created February 11, 2017 13:39
List all user-installed packages on OpenWrt / LEDE
#!/bin/sh
FLASH_TIME=$(opkg info busybox | grep '^Installed-Time: ')
for i in $(opkg list-installed | cut -d' ' -f1)
do
if [ "$(opkg info $i | grep '^Installed-Time: ')" != "$FLASH_TIME" ]
then
echo $i
fi