I hereby claim:
- I am azeirah on github.
- I am azeirah (https://keybase.io/azeirah) on keybase.
- I have a public key whose fingerprint is C6CC 3CFF 9C23 0D36 124F 26C2 B4D2 59A9 2CA3 1AE3
To claim this, I am signing this object:
| Template.register.events({ | |
| 'submit #register-form': function(event, t) { | |
| event.preventDefault(); | |
| var email = t.find('#register-email').value.toLowerCase(); | |
| var password = t.find('#register-password').value; | |
| var username = t.find('#register-username').value; | |
| Accounts.createUser({ | |
| email: email, | |
| password: password, | |
| username: username, |
| Template.previewNote.rerender = function () { | |
| console.log(UI._templateInstance()); | |
| var codes = UI._templateInstance().findAll("pre>code"); | |
| for (var i = 0; i < codes.length; i++) { | |
| hljs.highlightBlock(codes[i]); | |
| } | |
| }; |
I hereby claim:
To claim this, I am signing this object:
Sublime Text has a somewhat hidden feature to automatically reindent the current line. It would be wasteful to bind this to a keybinding, I prefer it to be automatic.
print("Executing a function")
def someFunction():
return 5Moving the print line one line down with ctrl+shift+down will result in
| /** | |
| * Calculates if a given point `point` lies above a given line `p1p2` | |
| * THIS FUNCTION DOES NOT RETURN BOOLEANS. It has three different return values, above = 1, below = -1, on the line = 0. | |
| * @param {[x, y]} point The point to test for | |
| * @param {[x, y]} p1 The starting point of a line | |
| * @param {[x, y]} p2 The ending point of a line | |
| * @return {number} 1 = above, -1 = below, 0 = exactly on the line | |
| */ | |
| function pointAboveLine(point, p1, p2) { | |
| // first, horizontally sort the points in the line |
| function rateLimit(fn, rate) { | |
| var queue = []; | |
| var currentlyEmptyingQueue = false; | |
| function emptyQueue() { | |
| if (queue.length) { | |
| currentlyEmptyingQueue = true; | |
| window.setTimeout(function () { | |
| queue.shift().call(); | |
| emptyQueue(); |
| """Confy, a dictionary backed by a json file, serves as a replacement to ini/config files. Use like any other dict, call .save() to save. | |
| Initialize it with a filename, the backing file will be created if it didn't previously exist, | |
| otherwise, the contents of the file will be loaded into the dict. | |
| save using confy.save(), loading happens automatically | |
| """ | |
| import json | |
| import collections |
| <?php | |
| // this list is large, but might not be completely exhaustive. | |
| // I retrieved it from this stackoverflow answer: http://stackoverflow.com/a/20818686/2302759 | |
| // and added zh_TW | |
| $locales = ["af_NA", "af_ZA", "af", "ak_GH", "ak", "sq_AL", "sq", "am_ET", "am", "ar_DZ", "ar_BH", "ar_EG", "ar_IQ", "ar_JO", "ar_KW", "ar_LB", "ar_LY", "ar_MA", "ar_OM", "ar_QA", "ar_SA", "ar_SD", "ar_SY", "ar_TN", "ar_AE", "ar_YE", "ar", "hy_AM", "hy", "as_IN", "as", "asa_TZ", "asa", "az_Cyrl", "az_Cyrl_AZ", "az_Latn", "az_Latn_AZ", "az", "bm_ML", "bm", "eu_ES", "eu", "be_BY", "be", "bem_ZM", "bem", "bez_TZ", "bez", "bn_BD", "bn_IN", "bn", "bs_BA", "bs", "bg_BG", "bg", "my_MM", "my", "ca_ES", "ca", "tzm_Latn", "tzm_Latn_MA", "tzm", "chr_US", "chr", "cgg_UG", "cgg", "zh_Hans", "zh_Hans_CN", "zh_Hans_HK", "zh_Hans_MO", "zh_Hans_SG", "zh_Hant", "zh_Hant_HK", "zh_Hant_MO", "zh_Hant_TW", "zh", "kw_GB", "kw", "hr_HR", "hr", "cs_CZ", "cs", "da_DK", "da", "nl_BE", "nl_NL", "nl", "ebu_KE", "ebu", "en_AS", "en_AU", "en_BE", "en_BZ", "en_ |
This guide assumes you're working on a Unix-like environment. I'm using Linux Mint (Ubuntu). It should work on Macs, and might on Windows.
These are the four steps you can use as a checklist, see the headings below for the details on each step.
~/.authinfo.gpg| /** | |
| * tea_serving is a Natural number. | |
| * 1 represents 1 teaspoon | |
| * water_temperature is in degrees | |
| * tea_type is of enum TEA_TYPE | |
| * steeping time is in minutes | |
| */ | |
| function bitterness(tea_serving, water_temperature, tea_type, steeping_time) { | |
| let tooHotBitternessMultiplier = 1; | |
| let teaTypeGroundBitterness = 1; |