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
user www-data www-data; | |
worker_processes 3; | |
error_log /opt/nginx/logs/error.log; | |
events { | |
worker_connections 1024; | |
} | |
http { |
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
/** | |
* Matrix v0.9.0 | |
* | |
* Loosely based on flash: | |
* http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/geom/Matrix.html | |
*/ | |
(function() { | |
function Point(x, y) { | |
return { | |
x: x || 0, |
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
#TODO: Fade out things under certain conditions | |
lastMoved = new Date().getTime() | |
inactiveThreshold = 2000 | |
$(document).bind "mousemove", -> | |
lastMoved = new Date().getTime() | |
setInterval -> | |
currentTime = new Date().getTime() | |
inactiveTime = currentTime - lastMoved |
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
Object.extend = function(destination, source) { | |
for (var property in source) { | |
destination[property] = source[property]; | |
} | |
return destination; | |
}; | |
Object.reverseMerge = function(destination, source) { | |
for (var key in source) { |
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
namespace :backup do | |
task :database do | |
AWS::S3::Base.establish_connection!( | |
:access_key_id => '123', | |
:secret_access_key => '456' | |
) | |
database = "pixie_production" | |
file = 'dump.sql' | |
`pg_dump #{database} -U postgres > #{file}` |
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
#!/usr/bin/env ruby | |
# Set the local path to loop through | |
# Relative paths are fine. End with a slash. | |
PATH = "./" | |
# Set the file types to look for | |
FILE_TYPES = "css,jpg,png,html,js,svg,ttf,woff" | |
IGNORE_FILES = [""] |
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
(gdb) break XModule.cpp:1882 | |
Breakpoint 1 at 0x407d84: file XModule.cpp, line 1882. (2 locations) | |
(gdb) run | |
Starting program: /home/daniel/Desktop/milkytracker-0.90.85/src/milkyplay/extractor | |
Breakpoint 1, XModule (this=0x76c670) at XModule.cpp:1882 | |
1882 phead = new TXMPattern[256]; | |
(gdb) print phead | |
$1 = (TXMPattern *) 0x0 | |
(gdb) print header |
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
#include "Extractor.h" | |
#include "XModule.h" | |
#include <iostream> | |
using namespace std; | |
int main () | |
{ | |
XModule* module = new XModule(); | |
SYSCHAR* fileName = "Greensleeves.xm"; |
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
find . -name "*.[hm]" | while read line; do expand -t 2 "$line" > "$line.new"; mv "$line.new" "$line"; sed -i "" 's/ *$//' "$line"; 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
findCondenseOrCreate = (normalizedTag, name, fn) -> | |
query = new Parse.Query("Category") | |
query.equalTo "normalizedTag", normalizedTag | |
query.find | |
success: (results) -> | |
[category, duplicates...] = results | |
# We could try and collect numbers, but we really | |
# don't care since we should be recounting anyway |
OlderNewer