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
| usage: ./troll.rb <your@mail> <password> <from@mail> | |
| sample output: | |
| Kuba, | |
| Kolejnośc preferowana | |
| Bardzo fajny tutorial, wprowadzenie na początek:. | |
| http://www.ocaml-tutorial.org/ |
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 u = require('underscore'); | |
| var object = { | |
| varun: { | |
| curry: { | |
| rice: { | |
| dan: "green" | |
| } | |
| } | |
| } |
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
| requester.get("http://pudelek.pl", {}, function(window){ | |
| var headings = []; | |
| window.$(".entry").each(function(i, e){ | |
| var el = window.$(e).find(".header h3 a"); | |
| headings.push({href: el.attr('href'), title: el.text()} ); | |
| }); | |
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
| Python 2.7.2 (default, Jan 23 2012, 23:13:33) | |
| [GCC 4.2.1 Compatible Apple Clang 3.0 (tags/Apple/clang-211.10.1)] on darwin | |
| Type "help", "copyright", "credits" or "license" for more information. | |
| >>> ar = [1,2,3] | |
| >>> ar | |
| [1, 2, 3] | |
| >>> ar[:-1] | |
| [1, 2] | |
| >>> ar[-1] | |
| 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
| require("should") | |
| class ContentTypeValidator | |
| constructor: (whitelist = ['text/plain']) -> | |
| @whitelist = [] | |
| for content_type in whitelist | |
| @whitelist.push(content_type.toLowerCase()) | |
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 site_url = 'http://www.pudelek.pl/'; | |
| var default_headers = { | |
| 'User-Agent': 'Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1', | |
| 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', | |
| 'Accept-Language': 'en-us,en;q=0.5', | |
| 'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', | |
| 'Cache-Control': 'max-age=0' | |
| }; |
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 request = require('request'), default_headers, site_root = 'http://localhost:3000';; | |
| default_headers = { | |
| 'User-Agent': 'Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1', | |
| 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', | |
| 'Accept-Language': 'en-us,en;q=0.5', | |
| 'Accept-Encoding': 'gzip, deflate', | |
| 'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', | |
| // 'Connection': 'keep-alive', | |
| 'Cache-Control': 'max-age=0' |
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
| #!/usr/bin/env node | |
| var email = process.argv[2]; | |
| var crypto = require('crypto'); | |
| function trim (str) { | |
| var str = str.replace(/^\s\s*/, ''), | |
| ws = /\s/, | |
| i = str.length; | |
| while (ws.test(str.charAt(--i))); |
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
| console.log("Oh hai") | |
| function not_retarded_fib(n){ | |
| if(n < 3){ | |
| return 1; | |
| } | |
| var learn_dynamic_programming = [1,1]; | |
| for (var i = 2; i <= n; i++){ | |
| learn_dynamic_programming[i] = learn_dynamic_programming[i - 1] + learn_dynamic_programming[i - 2]; |
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
| ~/magellano/current$ bundle exec rake db:migrate --trace | |
| Invalid gemspec in [/usr/local/lib/ruby/gems/1.9.1/specifications/json-1.6.1.gemspec]: invalid date format in specification: "2011-09-18 00:00:00.000000000Z" | |
| Importer needs env to startup | |
| ** Invoke db:migrate (first_time) | |
| ** Invoke environment (first_time) | |
| ** Execute environment | |
| rake aborted! | |
| undefined method `each' for nil:NilClass | |
| /home/vagrant/magellano/shared/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb:68:in `register_javascript_expansion' | |
| /home/vagrant/magellano/shared/bundle/ruby/1.9.1/gems/actionpack-3.2.0/lib/action_view/railtie.rb:21:in `block (2 levels) in <class:Railtie>' |