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
%% @author Bryan Fink | |
%% @doc formjson_resource takes x-www-form-urlencoded data and | |
%% re-encodes it as JSON. The data is expected as query | |
%% parameters for a GET, and request body for a POST. | |
%% | |
%% ``` | |
%% In: one=two&me=pope | |
%% Out: {"one":"two","me":"pope"} | |
%% ''' | |
-module(formjson_resource). |
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
$(window).scroll(function(){ | |
if($(window).scrollTop() == $(document).height() - $(window).height()){ | |
handler(); | |
} | |
}); | |
function handler(){ | |
alert('Pong'); | |
} |
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
9:40 joboza@admins-MacBook-Pro:~/Workspace/Ruby/webadapter/tmp λ cat lol.rb | |
# encoding: UTF-8 | |
alias :λ :lambda | |
foo = λ { puts "fuck yeah" } | |
foo[] | |
class SkyFoo | |
def ✈ |
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
# encoding: UTF-8 | |
alias :λ :lambda | |
foo = λ { puts "fuck yeah" } | |
foo[] |
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
var document = { name: "jakub", surname: "oboza", games: []}; | |
db.people.save(document); | |
var person = db.people.findOne({name: "jakub"}); | |
person | |
{ | |
"_id" : ObjectId("4f65da9d8199c991088c9ca4"), | |
"name" : "jakub", | |
"surname" : "oboza", | |
"games" : [ ] | |
} |
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
<VirtualHost *:80> | |
ServerName web1.webadapter.migapps.com | |
RewriteEngine On | |
<Proxy balancer://londondc> | |
BalancerMember http://loadbalancer.webadapter.migapps.com | |
</Proxy> | |
ProxyPass / balancer://londondc/ |
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
So we had modeling done this way: | |
You use mongodb "like" relational db while editing and forming thing to publish and when you publish you are producing one document with embedded document. | |
like this | |
[Car] -> has many via dbrefs -> [Part] | |
produces | |
[CarSnapshot] -> has many via embedded doc -> [Part] |
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
http://example.com/cgi-bin/toons_awk_web_service.sh/toons |
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
// callback | |
fs.readFile('/tmp/largefile', function (err, data) { | |
if (err) throw err; | |
process_content(data); | |
}); | |
// bloating | |
var data = fs.readFileSync("/tmp/largefile"); | |
process_content(data); |
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
upstream faye { | |
server 127.0.0.1:9292; | |
} | |
upstream webrick{ | |
server 127.0.0.1:3000; | |
} | |
server { | |
listen 80 default; |