- n'to
- workals
- oliver schoris
- oliver koletzki
- andhim
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 app/views -name "*.jade" -type f|xargs rm -f |
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 i = 0; | |
var j = 0; | |
// write data to request body | |
setInterval(function(){ | |
console.log('\n'); | |
i = i + 1; | |
console.log('Sending request: ' + i); | |
http.get("http://localhost:3000", function(res) { | |
j = j + 1; |
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
Show hidden characters
{ | |
"bitwise": false, | |
"immed": true, | |
"newcap": true, | |
"noarg": true, | |
"noempty": true, | |
"nonew": true, | |
"trailing": true, | |
"boss": true, | |
"eqnull": true, |
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
node_modules | |
public/components | |
public/dist |
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 callback (err, res) { | |
// res.request.href => is this is url of the uploaded file? | |
} | |
fs.createReadStream('image-1.png').pipe(client.upload({ | |
container: 'a-container', | |
remote: 'image-1.png' | |
}), callback); | |
// res => | |
/* |
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
/** | |
* Module dependencies. | |
*/ | |
var http = require('http'); // native modules first | |
var mongoose = require('mongoose'); // npm modules second | |
var config = require('config'); // modules that are required via NODE_PATH third | |
var fmt = require('./format-date'); // local modules fourth | |
var oauth = require('../../oauth'); // relative modules last |
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
'use strict'; | |
var gulp = require('gulp'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var babel = require('babelify'); |
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 << ActiveRecord::Base | |
alias_method :[], :find | |
end | |
@post = Post[5] | |
@post = Post[:first] | |
@post = Post[:all, :conditions => { :name => "first post" }] |
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
#config/initializers/omniauth.rb | |
require 'openid/store/filesystem' | |
ActionController::Dispatcher.middleware.use OmniAuth::Builder do #if you are using rails 2.3.x | |
#Rails.application.config.middleware.use OmniAuth::Builder do #comment out the above line and use this if you are using rails 3 | |
provider :twitter, 'key', 'secret' | |
provider :facebook, 'app_id', 'secret' | |
provider :linked_in, 'key', 'secret' | |
provider :open_id, OpenID::Store::Filesystem.new('/tmp') | |
end |
OlderNewer