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
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 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 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 | |
LESSFILE=$1 | |
CSSFILE=`basename $1 .less`.css | |
while true; do | |
inotifywait -e modify -e move -e close $LESSFILE && \ | |
date && echo "compiling LESS" && \ | |
lessc $LESSFILE> $CSSFILE | |
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
var fs = require('fs'); | |
var im = require('imagemagick'); | |
// define source of pictures: | |
var source_dir = '/source' | |
// define output of resized pictures: | |
var output_dir = '/output' | |
//define image sizes |
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
var fs = require('fs'); | |
var im = require('imagemagick'); | |
var async = require('async'); | |
var widths = ['270', '590', '910', '1230']; | |
var source_dir = process.cwd()+'/source/'; | |
var output_dir = process.cwd()+'/output/'; | |
fs.readdir(source_dir, function(err, files){ | |
if (err) throw err; |
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
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()); |
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 | |
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 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 request = require('request'); | |
var async = require('async'); | |
var xml2js = require('xml2js'); | |
var parseString = require('xml2js').parseString; | |
var parser = new xml2js.Parser( | |
{ | |
preserveChildrenOrder: true, | |
explicitArray: false, | |
charkey: "content", |
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
var fs = require('fs'); | |
var async = require('async'); | |
var request = require('request'); | |
var cheerio = require('cheerio'); | |
var _ = require('lodash'); | |
var url = 'http://programmingexcuses.com'; | |
var excuses = []; |
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 | |
# dependencies: | |
# | |
# http://johnmacfarlane.net/pandoc/installing.html | |
# variables: | |
mainfont="Helvetica" | |
sansfont="Helvetica" |
OlderNewer