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
cd public/assets/ | |
ls applic* | |
rm applic* | |
cd ../../ | |
rake assets:precompile | |
git add -A | |
git commit -m "deploy" | |
git push staging |
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
lookfor() { grep --color=always -ri "$1" . } | |
// add this to .barshrc or .zshrc |
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 http = require('http'); | |
var bl = require('bl'); | |
//get data from url. | |
function curl(url) { | |
http.get(url, function (res) { | |
res.pipe(bl(function (err, data) { | |
if (err) throw err; | |
else { | |
return data; |
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
<> learnyounode run 10.js ["core_concepts/learnyou", "ron@yo"] | |
/home/ron/learn/node/nodeschool/core_concepts/learnyou/10.js:19 | |
var date = date.joint("-"); | |
^ | |
TypeError: Object has no method 'joint' | |
at date_format (/home/ron/learn/node/nodeschool/core_concepts/learnyou/10.js:19:19) | |
at Server.connect (/home/ron/learn/node/nodeschool/core_concepts/learnyou/10.js:8:11) | |
at Server.EventEmitter.emit (events.js:95:17) | |
at TCP.onconnection (net.js:1188:8) |
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
6415 verbose true,/usr/lib/node_modules,/usr/lib/node_modules unbuild [email protected] | |
6416 verbose /usr/bin,[object Object] binRoot | |
6417 info postuninstall [email protected] | |
6418 error [email protected] install: `node-gyp rebuild` | |
6418 error Exit status 1 | |
6419 error Failed at the [email protected] install script. | |
6419 error This is most likely a problem with the leveldown package, | |
6419 error not with npm itself. | |
6419 error Tell the author that this fails on your system: | |
6419 error node-gyp rebuild |
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
class PostsController < ApplicationController | |
+ require 'digest/md5' | |
def index | |
@posts = Post.published_posts | |
end | |
def show | |
- post = Post.friendly.find(params[:id]) | |
+ #hash for all the wierd reroute requests |
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
Fetching repository, done. | |
Counting objects: 3, done. | |
Delta compression using up to 2 threads. | |
Compressing objects: 100% (3/3), done. | |
Writing objects: 100% (3/3), 367 bytes | 0 bytes/s, done. | |
Total 3 (delta 2), reused 0 (delta 0) | |
-----> Node.js app detected | |
-----> Requested node range: 0.10.29 | |
-----> Resolved node version: 0.10.29 | |
-----> Downloading and installing node |
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
function multiStream(){ | |
var mdm = MuxDemux(); | |
mdm.once('connection', connectNew); | |
mdm.on('connection', connectHandler); | |
mdm.on('error', function(err){ | |
console.log(err.toString()); | |
mdm.destroy(); | |
}); | |
mdm.send = function(msg){ |
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 tail = spawn('tail', ['-n0', '-f', '../irclogs/**/**/*.log'], { | |
stdio: [ | |
null, | |
'pipe', | |
fs.openSync("err.out", "w") | |
] | |
}); | |
tail.stdout.on('data', function(data){ | |
console.log(data.toString('utf8')); |
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
cfu () { | |
WARN='^.*wget\s-q(O| -O).*$|^.*\|\s(bash |sh ).*$|^.*eval.*$ | |
|$' | |
QC=$(echo $1 | recode ascii../b64 | sed 's/...$//') | |
curl "https://www.commandlinefu.com/commands/matching/$1/$QC/plaintext" | egrep --color=always $WARN | |
} |
OlderNewer