This file contains hidden or 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 | |
mkdir git-repo | |
cd git-repo | |
git init | |
touch my_code.sh | |
git add my_code.sh | |
echo "echo Hello" > my_code.sh | |
git commit -am 'initial' | |
git checkout -b new_branch | |
echo "echo \"Hello World\"" > my_code.sh |
This file contains hidden or 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 | |
filename=$1 | |
basename=`basename $1 .md` | |
markdown-pdf $1 -o $basename.pdf -s /home/geronimo/Dropbox/templates/style.css |
This file contains hidden or 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
var colour = ''; | |
for (var i = 250; i > 0; i = i - 5) { | |
colour = 'background-color: rgb(' + i + ',' + i + ',' + i + ')'; | |
console.log(colour); | |
document.write('<div style="float: left;margin: 5px; width:90px;height:30px;' + colour+ '"></div>'); | |
} |
This file contains hidden or 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
###################################################### | |
# Project: http://code.google.com/p/51-android/ # | |
# File: /etc/udev/rules.d/51-android.rules # | |
# Author: snowdream <[email protected]> # | |
# Date: 2010.06.07 # | |
###################################################### | |
#Acer | |
SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0660", OWNER="snowdream" |
This file contains hidden or 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> | |
<title>Float</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
</head> | |
<style> | |
.left { | |
width: 300px; | |
float: left; |
This file contains hidden or 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
var morse = require('morse'); | |
var childProcess = require('child_process'); | |
var async = require('async'); | |
var encoded = morse.encode('SOS'); | |
function onoff (duration, callback) { | |
childProcess.exec('xset led 3',function (error, stdout, stderr){ | |
}); | |
This file contains hidden or 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 | |
# to automatically add a key you can use the following: | |
mac_key_path='/Users/hb/.ssh/foobar' | |
linux_key_path='/home/username/.ssh/foobar' | |
# uncommend below | |
# ssh-add $mac_key_path | |
# ssh-add $linux_key_path |
This file contains hidden or 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 | |
# dependencies: | |
# | |
# http://johnmacfarlane.net/pandoc/installing.html | |
# variables: | |
mainfont="Helvetica" | |
sansfont="Helvetica" |
This file contains hidden or 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 | |
pages_requested=10 | |
characters_per_page=2400 | |
files=( "code.md" "interface_design.md" "project_management.md" ) | |
function countcompare { | |
images=`grep -c '.png' $1` | |
chars=`wc -c $1 | awk '{split($0,array," ")} END{print array[1]}'` | |
chars_with_images=$((chars+images*700)) |
This file contains hidden or 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
var express = require('express'); | |
var passport = require('passport'); | |
var mongoose = require('mongoose'); | |
var mongoStore = require('connect-mongodb'); | |
module.exports = function() { | |
this.set('views', __dirname + '/../../app/views'); | |
this.set('view engine', 'jade'); | |
this.use(express.logger()); |