I hereby claim:
- I am johnkpaul on github.
- I am johnkpaul (https://keybase.io/johnkpaul) on keybase.
- I have a public key ASCQXaLzmpRi68-yrWO6Xj4-PdEOmQzXrG1sIlB75AIn4Ao
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| def test_method | |
| puts 'test' | |
| end | |
| l = -> { puts 'lambda' } | |
| # Why does this print true?? | |
| puts l.private_methods.include? :test_method |
| function add() { | |
| var args = [].slice.call(arguments); | |
| var sum = args.reduce(function(a, b){ return a + b; }, 0); | |
| return numify(sum); | |
| function numify(num){ | |
| var ret = function(a){ | |
| return a === undefined ? numify(num) : numify(a + num); | |
| } |
| class SumOfFactors | |
| def initialize(until_num, *divisible_by) | |
| @until_num = until_num | |
| @divisible_by = divisible_by | |
| end | |
| def get_sum | |
| get_range.select(&self.method(:is_disivible_by)) | |
| .inject(&self.method(:sum_arr)) |
| on run {} | |
| activate application "Microsoft Outlook" | |
| tell application "Microsoft Outlook" | |
| set selected folder to folder "Archive" | |
| end tell | |
| tell application "System Events" | |
| keystroke "f" using {option down, command down} | |
| end tell | |
| end run |
| var compiler = new traceur.Compiler; | |
| compiler.script(content, {experimental: true}) | |
| .then(function(result){ | |
| var source = result.js; | |
| eval(source); | |
| }); |
This is a list of Ember components that can hopefully inspire your own solution to handle some really common cases. Please let me know of more.
| fun! BeautifyAndRefresh() | |
| set noconfirm | |
| !grunt jsbeautifier | |
| bufdo e! | |
| set confirm | |
| endfun | |
| nmap <leader>b call BeautifyAndRefresh() |
| node -e 'process.stdin.pipe(require("fs").createWriteStream(process.argv[1]))' FILENAME |
I want to know if I can achieve one particular goal with any particular module loader. Let me tell you a story.
I work on a large client side JavaScript application for a company with a fremium business model. Let's call it Freely. Freely's free experience is composed of modules A, B and C in the application. Once the user hands over their credit card, they enter the paid experience, which is composed of modules B-Z.
Each of modules A-Z is roughly the same size, so the free experience requires roughly 1/9th of the entire codebase in order to function correctly. I don't want the client to need to download all of the modules becuase only 1/100th of all users will actually end up paying. (The conversion rate is another issue, but at Freely, we're more focused on other things).