Skip to content

Instantly share code, notes, and snippets.

View Couto's full-sized avatar
👽
Did you raid area 51?

Luís Couto Couto

👽
Did you raid area 51?
View GitHub Profile
@Couto
Couto / fixsvn.sh
Last active June 17, 2016 10:37 — forked from siddhadev/gist:5814802
Fix the svn "Working copy text base is corrupt" error.
#!/bin/bash
set -e
usage(){
echo "Error $errcode $errorcode at line ${BASH_LINENO[0]} while executing: $BASH_COMMAND"
exit $errorcode
}
trap usage ERR
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s http://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'

First, install dnsmasq using brew:

$ brew update
$ brew install dnsmasq

Then create your configuration

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@Couto
Couto / proxy.js
Last active December 15, 2015 22:49 — forked from grantmichaels/proxy.js
make it a little friendlier for the terminal
var net = require("net"),
args = {};
process.argv.forEach(function (val, index) {
var dest, listen;
if (val === '--destination') {
dest = process.argv[index + 1].split(':');
args.destination = dest[0];
@Couto
Couto / quantize.js
Last active December 15, 2015 12:59 — forked from nrabinowitz/quantize.js
define(function () {
'use strict';
/*!
* quantize.js Copyright 2008 Nick Rabinowitz.
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
// fill out a couple protovis dependencies
/*!
@Couto
Couto / Custom.css
Created December 17, 2012 09:54 — forked from lightyrs/Custom.css
/*
Chrome Developer Tools - Monokai Color Theme
Author: Béres Máté Csaba / bjmatt.com / @bjmatt / [email protected]
-----------------------------------------------------------------------------------------------------------
Installation:
1. Find your Chrome's user stylesheets directory:
// Original code from http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/
var metas = document.getElementsByTagName('meta');
var i;
if (navigator.userAgent.match(/iPhone/i)) {
for (i=0; i<metas.length; i++) {
if (metas[i].name == "viewport") {
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
}
}