This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<style> | |
html { | |
background: url('./pandora.jpg') no-repeat center center fixed; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"hex": "#EFDECD", | |
"name": "Almond", | |
"rgb": "(239, 222, 205)" | |
}, | |
{ | |
"hex": "#CD9575", | |
"name": "Antique Brass", | |
"rgb": "(205, 149, 117)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From http://stackoverflow.com/questions/4770025/how-to-disable-scrolling-temporarily | |
// left: 37, up: 38, right: 39, down: 40, | |
// spacebar: 32, pageup: 33, pagedown: 34, end: 35, home: 36 | |
var keys = [37, 38, 39, 40]; | |
function preventDefault(e) { | |
e = e || window.event; | |
if (e.preventDefault) | |
e.preventDefault(); | |
e.returnValue = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fb -[NSException raise] | |
fb -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] | |
fb -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] | |
#define NSZombies | |
# this will give you help messages. Set to NO to turn them off. | |
set env MallocHelp=YES | |
# might also be set in launch arguments. | |
set env NSZombieEnabled=YES | |
set env NSDeallocateZombies=NO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
egrep -o '([0-9]{1,3}\.){3}[0-9]{1,3}' # finds ips in a file | |
# From http://stackoverflow.com/questions/1444406/how-can-i-delete-duplicate-lines-in-a-file-in-unix/1444448#1444448 | |
# delete duplicate, consecutive lines from a file (emulates "uniq"). | |
# First line in a set of duplicate lines is kept, rest are deleted. | |
sed '$!N; /^\(.*\)\n\1$/!P; D' | |
# delete duplicate, nonconsecutive lines from a file. Beware not to | |
# overflow the buffer size of the hold space, or else use GNU sed. | |
sed -n 'G; s/\n/&&/; /^\([ -~]*\n\).*\n\1/d; s/\n//; h; P' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dir = 1$ | |
for gitconfig in `find $dir -wholename "*.git/config" -type f`;do nano "$gitconfig"; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for url in `curl http://www.vagrantbox.es | grep '<td>h' | sed 's/<th scope="row">//g' | sed 's/<\/td>//g' | sed 's/<td>//g' | sed '/goo.gl/d' | sed 's/\ //g'`; do file=`echo $url | sed 's/\ //g' | sed 's/\///g' | sed 's/disk1//g' | sed 's/http\://g' | sed 's/https\://g'`; vagrant box add $file $url; done; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerName www.example.com | |
# For local dev machines | |
ServerAlias staging.www.example.com | |
ServerAlias dev.www.example.com | |
DocumentRoot /var/www/www.example.com | |
<Directory /var/www/www.example.com> | |
Options +FollowSymlinks +Multiviews +Indexes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#################################### | |
# | |
# Backup to NFS mount script with | |
# grandfather-father-son rotation. | |
# | |
#################################### | |
# What to backup. | |
backup_files="/home /var/www /var/spool/mail /etc /root /boot /opt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#deviceMotionVariables { | |
text-align: justify; | |
width: 200px; | |
border: 5px solid black; | |
position: absolute; | |
right: 10%; | |
top: 5%; | |
display: none; | |
} |
NewerOlder