I hereby claim:
- I am sincarne on github.
- I am awhite (https://keybase.io/awhite) on keybase.
- I have a public key whose fingerprint is 03D6 1681 2C68 6546 EE75 AF41 6C97 1EA3 6A19 6532
To claim this, I am signing this object:
| // From: https://davidwalsh.name/query-string-javascript | |
| function getUrlParameter(name) { | |
| name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]'); | |
| var regex = new RegExp('[\\?&]' + name + '=([^&#]*)'); | |
| var results = regex.exec(location.search); | |
| return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' ')); | |
| }; |
| Processing triggers for initramfs-tools (0.122ubuntu8.11) ... | |
| update-initramfs: Generating /boot/initrd.img-4.4.0-62-generic | |
| W: mdadm: /etc/mdadm/mdadm.conf defines no arrays. | |
| gzip: stdout: No space left on device | |
| E: mkinitramfs failure cpio 141 gzip 1 | |
| update-initramfs: failed for /boot/initrd.img-4.4.0-62-generic with 1. | |
| dpkg: error processing package initramfs-tools (--configure): | |
| subprocess installed post-installation script returned error exit status 1 | |
| No apport report written because MaxReports is reached already |
| # Add this to your .profile | |
| # Typing `serve` with no arguments will start the PHP inbuilt | |
| # server, listening on port 8000. | |
| # If you provide an argument, that is assumed to be the port | |
| # on which to listen. | |
| function serve() { | |
| if [ $# -eq 0 ]; then | |
| php -S localhost:8000 | |
| else | |
| php -S localhost:"$@" |
| #!/usr/bin/python | |
| # requires trello, requests, available through pip | |
| from trello import TrelloApi | |
| import json, os, requests, subprocess | |
| HABITICA_USER = os.getenv('HAB_API_USER', '') | |
| HABITICA_KEY = os.getenv('HAB_API_TOKEN', '') | |
| TRELLO_KEY = os.getenv('TRELLO_API_KEY', '') |
I hereby claim:
To claim this, I am signing this object:
| // http://www.paciellogroup.com/blog/2011/10/detecting-if-images-are-disabled-in-browsers/ | |
| function isHighContrast() { | |
| var e, c; | |
| //Create a test div | |
| e = document.createElement("div"); | |
| //Set its color style to something unusual | |
| e.style.color = "rgb(31,41,59)"; | |
| //Attach to body so we can inspect it |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title></title> | |
| <meta name="description" content=""> | |
| <meta name="author" content=""> |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| // Validate a Canadian postal code with JQuery Validation | |
| // Use with http://docs.jquery.com/Plugins/Validation | |
| // Adding the method | |
| jQuery.validator.addMethod("cdnPostal", function(postal, element) { | |
| return this.optional(element) || | |
| postal.match(/[a-zA-Z][0-9][a-zA-Z](-| |)[0-9][a-zA-Z][0-9]/); | |
| }, "Please specify a valid postal code."); | |
| // Using the new rule |