Skip to content

Instantly share code, notes, and snippets.

@trdlo
trdlo / unblockdns.md
Created January 6, 2016 23:48 — forked from esamattis/unblockdns.md
Transparent Netflix only region unblock with Asuswrt Merlin

Transparent Netflix only region unblock with Asuswrt Merlin

Ad-free time!, UnoTelly etc. services provide a nice way to unblock regions for Netflix and others using their custom DNS servers.

But I don't want to direct all my DNS traffic to them and I'm too lazy to manually configure all my devices (phones, tablets, media center boxes etc.). So here's how to transparently unblock Netflix for all your devices using the [Asuswrt Merlin][merlin] firmware. It's a custom router firmware which can be used on the Asus RT-N66U router for example.

Prerequisites

Enable JFFS partition and SSH login from http://<ROUTER-IP>/Advanced_System_Content.asp

@trdlo
trdlo / nginx.conf
Created October 4, 2015 19:30 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048

Arch Linux installation (preinstalled Windows 8.1 dual boot)

Before

  1. Disable Windows Fast-Startup
  2. Disable Secure Boot

Partitioning

#!/usr/bin/python
# This is a simple script to convert a very limited set of MoinMoin wiki syntax
#to markdown. I am using it in my migration from MoinMoin to a gitit+markdown
#wiki.
DO_GIT = False
#DISABLED#DO_GIT = True
import os
import re
REPLACEMENTS = (
("(./)", "[x]"),
@trdlo
trdlo / README.md
Created September 1, 2014 22:10 — forked from lmullen/README.md

The file page.st goes in the templates/ directory in the Gitit wiki home directory. You'll put the Ace JavaScript and CSS files in static/.

@trdlo
trdlo / stickynotes_install.sh
Last active April 21, 2017 21:21
sticky_notes install @ nginx
# http://sayakb.github.io/sticky-notes/pages/install/
# https://github.com/sayakb/sticky-notes
mkdir /var/www/paste && cd /var/www/paste.domain.tld && git clone https://github.com/sayakb/sticky-notes.git .
chown -Rv www-data:www-data /var/www/paste
cp stickynotes_nginx.conf /etc/nginx/sites-enabled/paste.domain.tld
ln -s /etc/nginx/sites-available/paste.domain.tld /etc/nginx/sites-enabled/.
/etc/init.d/nginx reload
cd /var/www/paste.domain.tld/app/config
mv database.sample.php database.php
apt-get install python-dev libevent-dev python-flask
git clone https://github.com/TkTech/notifico
cd notifico
python setup.py install
# reg an app @ https://github.com/settings/applications/new
vim notifo/config.py
python -m notifico www --host=stuff.pwn.sk --port=7891
@trdlo
trdlo / webm.md
Created May 23, 2014 01:26 — forked from ndarville/webm.md

Grab ffmpeg from https://www.ffmpeg.org/download.html

It's a command line tool which means you will have to type things with your keyboard instead of clicking on buttons.

The most trivial operation would be converting gifs:

ffmpeg -i your_gif.gif -c:v libvpx -crf 12 -b:v 500K output.webm
  • -crf values can go from 4 to 63. Lower values mean better quality.
  • -b:v is the maximum allowed bitrate. Higher means better quality.
#!/bin/bash
#
# IRC notification post-receive hook.
# Based on https://wiki.icinga.org/display/community/GIT+Commit+Bot
#
# Author: Mikael Fridh <[email protected]>
#
# This script pulls out the commit information and sends it to
# the Notify plugin in supybot via localhost 5050.
#

IRC protocol extensions

Original IRC protocol

Original protocol (IRCv2): [RFC 1459][rfc1459]

Later updated by [RFC 2810][rfc2810], [RFC 2811][rfc2811], [RFC 2812][rfc2812], [RFC 2813][rfc2813], but few servers follow these completely. IRCnet is probably the most complete implementation.