This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// on page load, search for & display a random gif matching your search term using the Giphy API and add them to the pihole blockpage | |
// thanks to the nealrs (github) | |
// immae1 2017 | |
var x = "Pi-hole: A black hole for Internet advertisements." | |
document.addEventListener('DOMContentLoaded', function () { | |
items = ["funny cats","dejay","nerd","beer"]; // tag array | |
var item = items[Math.floor(Math.random()*items.length)]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/boot/bzImage | |
# Linux kernel userspace initialization code, translated to bash | |
# (Minus floppy disk handling, because seriously, it's 2017.) | |
# Not 100% accurate, but gives you a good idea of how kernel init works | |
# GPLv2, Copyright 2017 Hector Martin <marcan@marcan.st> | |
# Based on Linux 4.10-rc2. | |
# Note: pretend chroot is a builtin and affects the current process | |
# Note: kernel actually uses major/minor device numbers instead of device name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io" | |
"os" | |
"os/exec" | |
"strings" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Úτƒ-8 encoded | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
%%% Variables initiating %%% | |
\newcounter{colourmode} | |
\newcounter{pdftype} | |
\newcounter{iccinsert} | |
%% Control of colour mode and pdf type | |
\setcounter{colourmode}{1} % 0 --- undefined; 1 --- cmyk (always for pdf/x); 2 --- rgb | |
\setcounter{pdftype}{2} % 0 --- undefined; 1 --- pdf/x; 2 --- pdf/a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import json | |
from ansible.parsing.dataloader import DataLoader | |
try: | |
from ansible.inventory.manager import InventoryManager | |
A24 = True | |
except ImportError: | |
from ansible.vars import VariableManager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# link: https://gist.githubusercontent.com/celly/1591cf9305734812baad/raw/ | |
# | |
# Add to you /usr/local/bin/gravity.sh file under sources= | |
# | |
# samsung 'smart tv' | |
127.0.0.1 log-1.samsungacr.com | |
127.0.0.1 log-2.samsungacr.com | |
127.0.0.1 notice.samsungcloudsolution.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python3 | |
tags = { | |
"Rechnung": "Rechnung", | |
"Beleg": "Rechnung" | |
} | |
ocrLanguage = "deu" | |
verbose = False | |
import sys, subprocess |
This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.
Install Raspbian Jessie (2016-05-27-raspbian-jessie.img
) to your Pi's sdcard.
Use the Raspberry Pi Configuration tool or sudo raspi-config
to:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Foundation import NSKeyedUnarchiver | |
from struct import unpack | |
# This entire function is black magic of the highest order and I'll blog about it later | |
def extract_share(bookmark_data): | |
content_offset, = unpack('I', bookmark_data[12:16]) | |
first_TOC, = unpack('I', bookmark_data[content_offset:content_offset+4]) | |
first_TOC += content_offset | |
TOC_len, rec_type, level, next_TOC, record_count = unpack('IIIII', bookmark_data[first_TOC:first_TOC+20]) | |
TOC_cursor = first_TOC + 20 |