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 / books.txt
Created August 1, 2014 01:29 — forked from dscape/books.txt
Beyond Budgeting
Creativity Inc
Good to Great
Surviving & Thriving in a Relationship with an Entrepreneur
Predictable Revenues
Pricing with Confidence
Flow: The Psychology of Optimal Experience
Further Up The Organization
Nail It Then Scale It
7 Habits Of Highly Effective People
.drop-area {
width: 150px;
height: 150px;
border: 5px dotted #CCC;
border-radius: 10%;
transition: all 0.3s linear;
}
.dragging {
width: 200px;
@couto
couto / config
Last active August 29, 2015 14:00
SSH Configuration to allow multiple SSH keys for deployment
Host projectname github.com
Hostname github.com
IdentityFile /home/{{username}}/.ssh/deploy_key_projectname
#User username-on-remote-machine
Host projectname2 bitbucket.org
Hostname bitbucket.org
IdentityFile /home/{{username}}/.ssh/deploy_key_projectname2
#User username-on-remote-machine
0 info it worked if it ends with ok
1 verbose cli [ '/home/couto/.nvm/v0.10.28/bin/node',
1 verbose cli '/home/couto/.nvm/v0.10.28/bin/npm',
1 verbose cli 'install' ]
2 info using [email protected]
3 info using [email protected]
4 verbose readDependencies using package.json deps
5 verbose install where, deps [ '/var/www/private',
5 verbose install [ 'resourceful',
5 verbose install 'passport',

Keybase proof

I hereby claim:

  • I am couto on github.
  • I am couto (https://keybase.io/couto) on keybase.
  • I have a public key whose fingerprint is 738C 0B7D 9345 9AB2 2A0B 4E09 9AE2 F73E 5DA7 2BDF

To claim this, I am signing this object:

#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected])
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
@couto
couto / tl-wn725n.md
Last active March 11, 2018 11:49
Install TL-WN725N on Raspbian

TL-WN725N (8188eu)

This was tested on the Raspbian wheezy (2014-01-07)

Update the system

apt-get update --fix-missing
apt-get upgrade
apt-get dist-upgrade

Basecamp was under network attack

The attack detailed below has stopped (for the time being) and almost all network access for almost all customers have been restored. We're keeping this post and the timeline intact for posterity. Unless the attack resumes, we'll post a complete postmortem within 48 hours (so before Wednesday, March 26 at 11:00am central time).

Criminals have laid siege to our networks using what's called a distributed denial-of-service attack (DDoS) starting at 8:46 central time, March 24 2014. The goal is to make Basecamp, and the rest of our services, unavailable by flooding the network with bogus requests, so nothing legitimate can come through. This attack was launched together with a blackmail attempt that sought to have us pay to avoid this assault.

Note that this attack targets the network link between our servers and the internet. All the data is safe and sound, but nobody is able to get to it as long as the attack is being successfully executed. This is like a bunch of people

@couto
couto / restore_console.js
Created March 6, 2014 18:04
Little bookmarklet to restore the console on those websites that disable it (netflix)
javascript:(function () {
var iframe = document.createElement("iframe"),
console;
iframe.src = "about:blank";
iframe.style.display = "none";
document.body.appendChild(iframe);
console = (iframe.contentWindow || iframe.contentDocument).console;
iframe.parentNode.removeChild(iframe);
@couto
couto / browser_detection.js
Created February 11, 2014 15:04
Mootools' browser detection
var browser = (function () {
var ua = navigator.userAgent.toLowerCase(),
platform = navigator.platform.toLowerCase(),
UA = ua.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/) || [null, 'unknown', 0],
mode = UA[1] === 'ie' && document.documentMode,
name = (UA[1] === 'version') ? UA[3] : UA[1],
version = mode || parseFloat((UA[1] === 'opera' && UA[4]) ? UA[4] : UA[2]),
browser;
return {