Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
#
# Convert the Yoyo.org anti-ad server listing
# into an unbound dns spoof redirection list.
# Modified by Y.Voinov (c) 2014
#
# Note: Wget required!
#
# Source : https://github.com/jedisct1/unbound/blob/master/contrib/create_unbound_ad_servers.sh
#
@illucent
illucent / dnscrypt-proxy
Created January 6, 2016 23:53 — forked from Zenithar/dnscrypt-proxy
Unbound + DNSCrypt configuration
DNSCRYPT_LOCALIP=127.0.0.1
DNSCRYPT_LOCALIP2=127.0.0.2
DNSCRYPT_LOCALPORT=9053
DNSCRYPT_RESOLVERPORT=443
DNSCRYPT_USER=nobody
DNSCRYPT_PROVIDER_NAME=2.dnscrypt-cert.resolver2.dnscrypt.eu
DNSCRYPT_PROVIDER_NAME2=2.dnscrypt-cert.resolver1.dnscrypt.eu
DNSCRYPT_PROVIDER_KEY=3748:5585:E3B9:D088:FD25:AD36:B037:01F5:520C:D648:9E9A:DD52:1457:4955:9F0A:9955
DNSCRYPT_PROVIDER_KEY2=67C0:0F2C:21C5:5481:45DD:7CB4:6A27:1AF2:EB96:9931:40A3:09B6:2B8D:1653:1185:9C66
DNSCRYPT_RESOLVERIP=77.66.84.233
@illucent
illucent / command.sh
Created January 6, 2016 23:48 — forked from Jesse-V/command.sh
DNSCrypt encrypted DNS + Unbound cache
/usr/local/sbin/dnscrypt-proxy --resolver-address=<address> --provider-key=<publicKey> --provider-name=<name> --ephemeral-keys --local-address=127.0.53.1 --daemonize
@illucent
illucent / linux_performance.md
Created January 5, 2016 19:55 — forked from marianposaceanu/linux_performance.md
Linux simple performance tweaks

Linux simple performance tweaks

Change the I/O Scheduler

Open $ vim /etc/default/grub then add elevator=noop next to GRUB_CMDLINE_LINUX_DEFAULT. Run $ update-grub and $ cat /sys/block/sda/queue/scheduler to be sure that noop is being used:

$ vim /etc/default/grub
$ update-grub
$ cat /sys/block/sda/queue/scheduler

[noop] deadline cfq

@illucent
illucent / RegEx Snippets.md
Created January 2, 2016 18:03 — forked from ericrasch/RegEx Snippets.md
RegEx Snippets

RegEx Snippets


Extract URLs

Find all links

Works pretty well in capturing the full URL when using this in a search (like in Sublime Text 2). (https?|ftps?)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/?

@illucent
illucent / helpers.py
Created December 29, 2015 10:34 — forked from danielrichman/helpers.py
flask & bootstrap pagination li width and phone/tablet/desktop page show sizes are suitable for up to 3 digit page numbers
@app.template_global('show_which_pages')
def show_which_pages(page, pages, show=5):
"""
Work out which page numbers to display
Pages are numbered 1 to pages, inclusive.
page: the current page
pages: the total number of pages.
show: maximum number of pages to show
@illucent
illucent / scramble.py
Created December 28, 2015 23:33 — forked from dbspringer/scramble.py
A function to scramble the inner letters of a word/sentence.
#!/usr/bin/python
# -*- coding: utf-8 -*-
def scramble(unscrambled):
'''
Scrambles the word(s) in unscrambled such that the first and last letter remain the same,
but the inner letters are scrambled. Preserves the punctuation.
See also: http://science.slashdot.org/story/03/09/15/2227256/can-you-raed-tihs
'''
import string, random, re
@illucent
illucent / JSfixForResponsiveSVGsInSafari.js
Created December 28, 2015 18:18
A vanilla JavaScript fix (of sorts) for responsive SVGs in Safari and some other WebKit browsers.
/*
Title: Vanilla JavaScript to fix responsive SVGs in some versions of Safari.
What it does: Stops the problem I described here: http://stackoverflow.com/q/17158717/1147859 Reference URL of the issue: http://codepen.io/benfrain/full/fhyrD
It will work on all SVGs referenced inside objects as long as given the class .emb:
<object class="emb" data="img/cup.svg" type="image/svg+xml"></object>
And also any inline SVGs.
@illucent
illucent / filltextGist
Created December 26, 2015 15:02 — forked from joemaddalone/filltextGist
gist example for filltext.com
{
"rows" : "!",
"id" : "{index}",
"active" : "{bool}",
"fname" : "{firstName}",
"lname" : "{lastName}",
"category" : "[13,16,19,21]",
"tel" : "{phone}",
"address" : "{addressObject}",
"cc" : "{ccObject}",
@illucent
illucent / xorg_build-0.5.sh
Created December 24, 2015 08:36 — forked from mjtorn/xorg_build-0.5.sh
How to build Xorg unintrusively. Works on Debian Sid with xdm. At the time of posting this, at least.
#!/bin/bash
## Thank you for helping us help you help us all
SRCDIR=/usr/src/tmpfs/xorg
DSTDIR=/opt/xorg
## Define what's cloned
REPOS="\
git://anongit.freedesktop.org/git/xorg/util/macros \