This shows the execution order given JavaScript's Call Stack, Event Loop, and any asynchronous APIs provided in the JS execution environment (in this example; Web APIs in a Browser environment)
Given the code
| /*************************************************************************************************************************************************************** | |
| * | |
| * Application framework and settings | |
| * | |
| * [Description of application] | |
| * | |
| * @license [url] [description] | |
| * @author [author] [@email] | |
| * @repository [url] | |
| * |
This is a basic collection of things I do when setting up a new headless ubuntu machine as a webserver. Following the steps below should give you a reasonable secure server with HTTP/2 support (including ALPN in chrome) and the fast NGINX server. I am happy to add things so leave a comment.
After creating the server (droplet on DigitalOcean) log in with
| .responsive-margins-top_(1, 6px); | |
| .responsive-margins-top_(7, 60px); | |
| @screen-xs: 480px; | |
| @screen-sm: 768px; | |
| @screen-md: 992px; | |
| @screen-lg: 1200px; | |
| .responsive-margins-top_(@el, @value) { |
Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.
If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3
HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.
Follow along...
| /** | |
| * Found in http://mapbox.com footer (hover robot) | |
| */ | |
| .element:hover { | |
| -webkit-animation: rainbow 4s steps(36) infinite; | |
| } | |
| @-webkit-keyframes rainbow { | |
| from { -webkit-filter:hue-rotate(10deg); } | |
| to { -webkit-filter:hue-rotate(360deg); } |
| //detecting tab key press | |
| document.body.addEventListener('keydown', function detector (e) { | |
| var keyCode = e.keyCode || e.which; | |
| if(keyCode == 9) { | |
| console.log( 'Tab detected' ); | |
| document.documentElement.className += ' is-keyboarduser'; | |
| document.body.removeEventListener('keydown', detector); |
See below code for React, Vanilla JavaScript and jQuery.
This document details how I setup LE on my server. Firstly, install the client as described on http://letsencrypt.readthedocs.org/en/latest/using.html and make sure you can execute it. I put it in /root/letsencrypt.
As it is not possible to change the ports used for the standalone authenticator and I already have a nginx running on port 80/443, I opted to use the webroot method for each of my domains (note that LE does not issue wildcard certificates by design, so you probably want to get a cert for www.example.com and example.com).
For this, I placed config files into etc/letsencrypt/configs, named after <domain>.conf. The files are simple:
| /* globals grunticon: false */ | |
| (function() { | |
| 'use strict'; | |
| angular.module('ngGrunticon', []) | |
| .provider('grunticonEmbedConfig', function() { | |
| this.gruntIcons = undefined; | |
| this.init = function(grunticonCss) { |