sudo apt-get install nginx
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
require 'fileutils' | |
start_time = Time.now | |
SOURCE_DB = { | |
:name => 'db_name', | |
:user => 'db_user', | |
:password => 'db_pass', | |
:host => 'localhost' |
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
$(document).ready(function(){ | |
$("#new.btn").live("click",function(event){ | |
event.preventDefault(); | |
window.router.newNote(); | |
}); | |
$("#delete.btn").live("click",function(event){ | |
event.preventDefault(); | |
window.currentNote.destroy(); | |
window.router.index(); |
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
a | |
about | |
above | |
across | |
after | |
afterwards | |
again | |
against | |
all | |
almost |
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
.data | |
# Inputs | |
FloatX: .float 134.0625 | |
FloatY: .float 2.25 | |
# Result | |
Float_X_plus_Y: .float |
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
require 'open-uri' | |
require 'nokogiri' | |
# Scrapes wikipedia content for stack | |
# The API blows, writing this was faster | |
class WikiImporter | |
# Words rejected will excluded from the results | |
REJECT_WORDS = [ | |
"Comparison of web application frameworks", |
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
# Depth-first search (DFS) is an algorithm for traversing or | |
# searching a tree, tree structure, or graph. One starts at | |
# the root (selecting some node as the root in the graph case) | |
# and explores as far as possible along each branch before backtracking. | |
# | |
# A graph can be represented by its adjacency matrix G, | |
# where G[i][j] == 1 if there is an edge between | |
# vertices i and j and 0 otherwise. | |
# | |
# Below Graph in diagram http://i.imgur.com/sV1UzUn.png |
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
.data | |
Graph: .word 0,1,1,0,0,1,1,0,0 | |
.word 1,0,0,0,0,0,0,0,0 | |
.word 1,0,0,0,0,0,0,0,0 | |
.word 0,0,0,0,1,1,0,0,0 | |
.word 0,0,0,1,0,1,1,0,0 | |
.word 1,0,0,1,1,0,0,0,0 | |
.word 1,0,0,0,1,0,0,0,0 | |
.word 0,0,0,0,0,0,0,0,0 | |
.word 0,0,0,0,0,0,0,0,0 |
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
# Converting Still Images to Video | |
# ================================ | |
# depends on ImageMagick and ffmpeg | |
# | |
mkdir temp | |
cp *.jpg temp/. | |
mogrify -resize 800x800 temp/*.jpg | |
convert temp/*.jpg -delay 10 -morph 10 temp/%05d.jpg | |
ffmpeg -r 25 -qscale 2 -i temp/%05d.jpg output.mp4 | |
# rm -R temp |