Skip to content

Instantly share code, notes, and snippets.

@teffalump
teffalump / README.md
Last active January 4, 2023 21:17
OpenWRT adblock implementation

Others have recently developed packages for this same functionality, and done it better than anything I could do. Use the packages instead of this script:

Description

In its basic usage, this script will modify the router such that blocked addresses are null routed and unreachable. Since the address blocklist is full of advertising, malware, and tracking servers, this setup is generally a good thing. In addition, the router will update the blocklist weekly. However, the blocking is leaky, so do not expect everything to be blocked.

@ismell
ismell / README.md
Last active September 10, 2016 15:39
Docker Ubuntu upstart scripts

Production Ready Process Monitoring

  1. Install docker-manger.conf and docker-instance.conf in /etc/init

  2. Create a containers file in /etc/docker/ with the following format

     name: image cmd
    

    The name must be unique.

  3. sudo service docker-manager start

@erikhenrique
erikhenrique / bin-cc.md
Last active February 5, 2024 16:06
Bin de cartões de crédito para validação

Validação para cartão de crédito.

Bin e padrões para validação de cartão de crédito.

Bandeira Começa com Máximo de número Máximo de número cvc
Visa 4 13,16 3
Mastercard 5 16 3
@rpanachi
rpanachi / deploy.sh
Created September 20, 2012 19:18
Forrest Deployer Shell
#!/bin/bash
APP_DIR=/var/local/apps/app
RAILS_ENV=production
function step
{
if [ "$step_count" = "" ]; then
step_count=0
fi
@rogerleite
rogerleite / nginx.conf
Created August 2, 2012 19:24
Configuração Nginx
user www-data;
worker_processes 4;
error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
pid logs/nginx.pid;
events {
@panthomakos
panthomakos / benchmark.rb
Created May 3, 2012 20:06
Benchmark Your Bundle
#!/usr/bin/env ruby
require 'benchmark'
REGEXPS = [
/^no such file to load -- (.+)$/i,
/^Missing \w+ (?:file\s*)?([^\s]+.rb)$/i,
/^Missing API definition file in (.+)$/i,
/^cannot load such file -- (.+)$/i,
]
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@vgrichina
vgrichina / git-interactive-merge.sh
Created December 23, 2009 22:11
Interactive merge utility for Git, as described here http://www.angrylibertarian.com/node/53
#!/bin/bash
# git-interactive-merge
# Taken from: http://www.angrylibertarian.com/node/53
from=$1
to=$2
if [[ ( -z $from ) || ( -z $to ) ]]; then
echo "Usage:"
echo " git-interactive-merge <from-branch> <to-branch>"
exit 1