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
| let alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".split("") | |
| let base = alphabet.length | |
| function decode(code) { | |
| let c, i | |
| i = 0 | |
| for (let j = 0, len = code.length; j < len; j++) { | |
| c = code[j] | |
| i = i * base + alphabet.indexOf(c) | |
| } |
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
| gulp = require "gulp" | |
| browserify = require "browserify" | |
| coffee = require "gulp-coffee" | |
| transform = require "vinyl-transform" | |
| gulp.task "coffee", -> | |
| gulp | |
| .src "./app/scripts/**/*.coffee" | |
| .pipe coffee bare: true | |
| .pipe gulp.dest("./dist/lib") |
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
| When = require('when') | |
| x = -> | |
| d = When.defer() | |
| #d.resolve('hello') | |
| d.reject('hello') | |
| d.promise | |
| console.log "" |
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
| # DELETE AFTER USING | |
| desc "Rename project" | |
| task :rename do | |
| name = ENV['NAME'] || File.basename(Dir.pwd) | |
| camelize = lambda do |str| | |
| str.to_s.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase } | |
| end | |
| dir = Dir['**/gem_template*'] | |
| begin | |
| from = dir.pop |
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
| function getParams() { | |
| var vars = [], hash; | |
| var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); | |
| for(var i = 0; i < hashes.length; i++) { | |
| hash = hashes[i].split('='); | |
| vars.push(hash[0]); | |
| vars[hash[0]] = hash[1]; | |
| } | |
| return vars; | |
| } |
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
| backup: | |
| backup_itunes: | |
| music: | |
| source: ~/Music/iTunes/iTunes Music/Music | |
| destination: /Volumes/untitled/iTunes | |
| delete: false | |
| itunes_tv: | |
| source: ~/Music/iTunes/iTunes Music/TV Shows | |
| destination: /Volumes/untitled/iTunes | |
| delete: false |
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
| def rsync | |
| puts `rbackup #{ARGV.first}` | |
| end | |
| rsynced_at = nil | |
| rsync | |
| while true | |
| modified = `find #{File.dirname(__FILE__)}/breport #{File.dirname(__FILE__)}/../active/a_b -mmin -1`.split("\n") | |
| modified.delete_if { |m| m.include?('.git') } |
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
| LDFLAGS="-arch x86_64" ./configure --prefix=/usr/local/sphinx --with-mysql=/usr/local/mysql |
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
| Status: 500 Internal Server Error | |
| can't dump anonymous class Class | |
| /usr/lib64/ruby/1.8/yaml/rubytypes.rb:6:in `to_yaml' | |
| /usr/lib64/ruby/1.8/yaml/rubytypes.rb:110:in `node_export' | |
| /usr/lib64/ruby/1.8/yaml/rubytypes.rb:110:in `add' | |
| /usr/lib64/ruby/1.8/yaml/rubytypes.rb:110:in `to_yaml' | |
| /usr/lib64/ruby/1.8/yaml/rubytypes.rb:109:in `each' | |
| /usr/lib64/ruby/1.8/yaml/rubytypes.rb:109:in `to_yaml' | |
| /usr/lib64/ruby/1.8/yaml/rubytypes.rb:108:in `seq' | |
| /usr/lib64/ruby/1.8/yaml/rubytypes.rb:108:in `to_yaml' |
NewerOlder