| <script> | |
| // <snip> | |
| (function (window, document) { | |
| var loader = function () { | |
| var script = document.createElement("script"), tag = document.getElementsByTagName("script")[0]; | |
| script.src = "http://errorception.com/projects/" + _errs[0] + "/beacon.js"; | |
| tag.parentNode.insertBefore(script, tag); | |
| }; | |
| // Wait until window.onload before downloading any more code. |
| // Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
| // Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
| var FORMAT_ONELINE = 'One-line'; | |
| var FORMAT_MULTILINE = 'Multi-line'; | |
| var FORMAT_PRETTY = 'Pretty'; | |
| var LANGUAGE_JS = 'JavaScript'; | |
| var LANGUAGE_PYTHON = 'Python'; |
| #!/bin/bash | |
| mkdir -p ~/.ssh | |
| # generate new personal ed25519 ssh keys | |
| ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <[email protected]>" | |
| ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <[email protected]>" | |
| # generate new host cert authority (host_ca) ed25519 ssh key | |
| # used for signing host keys and creating host certs |
| Because I couldn't find these with a quick Google search on 28 April 2015: | |
| Usage: | |
| rails new APP_PATH [options] | |
| Options: | |
| -r, [--ruby=PATH] # Path to the Ruby binary of your choice | |
| # Default: /home/brian/.rvm/rubies/ruby-2.2.0/bin/ruby | |
| -m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL) | |
| [--skip-gemfile], [--no-skip-gemfile] # Don't create a Gemfile |
I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.
In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.
While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.
Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio
| http://www.webupd8.org/2014/11/how-to-use-compiz-in-ubuntu-mate-1404.html | |
| sudo apt-get install compiz compiz-plugins compizconfig-settings-manager | |
| launch "compizconfig settings manager" => Ubuntu Unity Plugin => Switcher (allow disabling of Default Switchers): | |
| Switcher all viewports => <Alt>Tab | |
| Previous window Switcher all viewports => <Shift><Alt>Tab |
| # equivalent constructors of arel table | |
| model = Arel::Table.new 'model_table_name' | |
| model = Arel::Table.new :model_table_name | |
| model = Model.arel_table | |
| # prepare arel query | |
| model_query = model.project(model[Arel.star]).where(model[:id].lte(20)) | |
| # executing query and obtains an array of Model objects | |
| model_list = Model.find_by_sql model_query |
| package main | |
| import ( | |
| "fmt" | |
| "io" | |
| "os" | |
| ) | |
| var path = "/Users/novalagung/Documents/temp/test.txt" |
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |