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
export POW_TIMEOUT=10000 | |
export POW_WORKERS=3 |
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
export POW_TIMEOUT=10000 | |
export POW_WORKERS=3 |
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
echo export POW_TIMEOUT=10000 >> ~/.powconfig | |
echo export POW_WORKERS=3 >> ~/.powconfig | |
powpid=$(ps -eaf|grep pow |grep -v grep |awk '{print $2}') | |
echo "kill $powpid" | |
sudo kill $powpid |
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
yum install readline-devel | |
rvm pkg install readline | |
rvm reinstall 1.9.2 --with-readline-dir=$rvm_path/usr | |
cd /var/www/neza/current | |
bundle exec rails c production |
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
// client = new AjaxAuthClient({ | |
// | |
// }) | |
// AjaxAuth.registerDialog(function(element){ | |
// $(element) | |
// .appendTo('body') | |
// .addClass('center_model') | |
// .width(400) |
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
// includes | |
var cluster = require('cluster'); | |
var cpuCount = require('os').cpus().length; | |
var util = require("util"); | |
var http = require("http"); | |
var url = require('url'); | |
var fs = require('fs'); | |
// max number of connections | |
var MAX_CONNECTIONS = 1000000; |
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 distance_between v,w | |
dist = 0 | |
adj[v].each do |e| | |
dist = e.weight if e.to == w | |
end | |
return dist | |
end | |
#receive a path str like "A-B-C", return length of that path | |
def path_distance str |
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
import Ember from 'ember'; | |
var get = Ember.get; | |
export default Ember.Component.extend({ | |
didInsertElement: function(){ | |
Ember.$(document).bind('click', this.closeThis); | |
}, | |
closeThis: function(event) { |
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
/* lib/index-array.js */ | |
App.IndexArray = Ember.ArrayController.extend({ | |
_indexName: 'index', | |
_isVirtual: true, | |
/** | |
* initializer function | |
* | |
* @param [Array] array proxy target object |
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
for f in *.aac; do ffmpeg -y -i $f -c:a libfdk_aac -b:a 32k -ac 1 $(basename $f .aac).m4a; done |