Skip to content

Instantly share code, notes, and snippets.

View tbaschak's full-sized avatar

Theo Baschak tbaschak

View GitHub Profile
current_hour=${CURRENT_HOUR:-$(date "+%k")}
# I have no idea how to get the actual list of colors but this has some colors in the screenshot
# https://gabri.me/blog/custom-colors-in-your-zsh-prompt
# Set the color value
work_color=154
keep_going_color=157
wrap_up_color=34
@stroebs
stroebs / make-chr.sh
Last active July 6, 2024 16:36
Install Mikrotik CHR on a Digital Ocean droplet (Ubuntu 20.04 tested working 29/03/2022)
#!/bin/bash
#
# Digital Ocean Ubuntu 18.04 x64 Droplet with "Regular Intel" CPU.
# Running:
# git clone https://gist.github.com/54fc09734a3911e91eeeb43434f117df.git
# cd 54fc09734a3911e91eeeb43434f117df/
# chmod +x make-chr.sh
# ./make-chr.sh
#
# Once the reboot is done, login with root/CHANGEME and change the password!
@jgamblin
jgamblin / scan.sh
Last active February 5, 2020 20:12
Continual Nmap With Slack Alerting.
#!/bin/bash
#
# Requires NMAP, NDIFF and Slackcli
# https://candrholdings.github.io/slack-cli/
# TARGETS should be set by env variable
# INTERVAL how many seconds to wait between scans
# SLACKTOKEN from here https://api.slack.com/web
TARGETS="scanme.handsonhacking.org"
@jgamblin
jgamblin / ut1mdiff.sh
Last active February 27, 2019 03:53
Download Umbrella's Top 1 Million Sites List For Last 2 Days And List New Sites
#!/bin/bash
day1=$(date --date="2 days ago" +"%Y"-"%m"-"%d")
day2=$(date --date="3 days ago" +"%Y"-"%m"-"%d")
mkdir -p ~/ut1m
cd ~/ut1m
#Get Yesterdays Data
printf "Getting $day1 Data\n"
cd ~/ut1m
mkdir $day1
This be a restricted node!
You best have permission from da admins or we be coming for ya.
Protect ya neck and respect this deck.
Reloads will not he tolerated and will be punishable by RZA's Iron Fists
$$$$$$$$$$$$$$$$""$o$o$o$o$n$oo$$""$$$$$$$$$$$$$$$
$$$$$$$$$$$$""o$$$$$$$$$$"$"$$$$$$$o$"$$$$$$$$$$$$
$$$$$$$$$"$o$$$$""$oo $ "" """$$$oo"$$$$$$$$$
$$$$$$$"o$$$$" ""o $oo o o ""$$$o"$$$$$$$
$$$$$"o$$$” oo$$$$$$$$$$o "$$$o"$$$$$
$$$$"o$$$ $ o$$$$$$$$$$$$$$"$$oo "$$$ $$$$
@tbaschak
tbaschak / check_github.py
Last active January 13, 2018 01:17
a simple python script to check/warn on Github's status via their API.
#!/usr/bin/env python2.7
from urllib2 import Request, urlopen, URLError
# for Python3 use the following:
# from urllib.request import Request, urlopen
# from urllib.error import URLError
import sys
import json
#!/usr/bin/env python
'''
Prototype tool for bulk IP->AS lookups for a specific date
Downloads RIS data locally (using CAIDA BGPSTREAM)
expects IP addresses/prefixes on STDIN (IPv4 and IPv6)
takes a single command-line argument which is the DATE for which to download the table (any format convertable by arrow will do)
example use:
cat file_with_maaaaany_ips | ./bulk-ris-lookup.py 2009-03-22
'''
@goodevilgenius
goodevilgenius / my_imgurup.sh
Last active October 26, 2017 13:56
[imgr upload] upload images to your imgur account from the command line #media #images
#!/bin/bash
# To use, create ~/.myimgurup, and put in your client ID and secret
# E.g.:
# CLIENT_ID=80238f8092
# CLIENT_SECRET=239a482b034c820
#
# Next run `base /path/to/my_imgurup.sh auth` to get your PIN and access token
# Finally, `base /path/to/my_imgurup.sh up /path/to/image.png` to upload an image
@olih
olih / jq-cheetsheet.md
Last active July 2, 2024 12:10
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

@outlyer
outlyer / fix_american_dad_sickbeard.diff
Created February 26, 2015 16:05
A (hacky) Fix for American Dad! series confusion between TVDB and SickBeard
diff --git a/lib/tvdb_api/tvdb_api.py b/lib/tvdb_api/tvdb_api.py
index 0970288..b45d619 100644
--- a/lib/tvdb_api/tvdb_api.py
+++ b/lib/tvdb_api/tvdb_api.py
@@ -834,6 +834,14 @@ class Tvdb:
seas_no = int(float(elem_seasnum.text))
ep_no = int(float(elem_epno.text))
+ # Fixes American Dad! issue from TVDB
+ if sid == 73141: