Just a dump of handy live templates I use with IntelliJ. They should also work with WebStorm.
- Go to
settings. - Search for
live templates. - Under the javascript section you should be able to manage your templates.
| (function( exports ) { | |
| var priv = new WeakMap(); | |
| function Emitter() { | |
| priv.set(this, { | |
| events: {} | |
| }); | |
| } | |
| Emitter.prototype.on = function( type, handler ) { |
| #!/bin/sh | |
| # | |
| # Use posixregex CLI tool from: https://github.com/syzdek/dmstools/blob/master/src/posixregex.c | |
| RE_IPV4="((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])" | |
| posixregex -r "^(${RE_IPV4})$" \ | |
| 127.0.0.1 \ | |
| 10.0.0.1 \ | |
| 192.168.1.1 \ |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| /** | |
| * Converts an image to a dataURL | |
| * @param {String} src The src of the image | |
| * @param {Function} callback | |
| * @param {String} outputFormat [outputFormat='image/png'] | |
| * @url https://gist.github.com/HaNdTriX/7704632/ | |
| * @docs https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement#Methods | |
| * @author HaNdTriX | |
| * @example | |
| * |
| find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \; |
This is the full version of the thread for opencart#1286, archived from notification emails.
The discussion has since been deleted almost entirely by OpenCart's developer.
Everyone who posted in it has also been blocked from the OpenCart repo.
| # The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
| # | |
| # Current known FCC address ranges: | |
| # https://news.ycombinator.com/item?id=7716915 | |
| # | |
| # Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
| # | |
| # In your nginx.conf: | |
| location / { |
| /* ******************************************************************************************* | |
| * THE UPDATED VERSION IS AVAILABLE AT | |
| * https://github.com/LeCoupa/awesome-cheatsheets | |
| * ******************************************************************************************* */ | |
| // 0. Synopsis. | |
| // http://nodejs.org/api/synopsis.html |