As configured in my dotfiles.
start new:
tmux
start new with session name:
var jquery = require('jquery'); | |
var dummy = (function($) { | |
"use strict"; | |
var _privateMethod = function() { | |
console.log('privateMethod'); | |
}; | |
var publicMethod = function() { |
@keyframes jelly-pop { 0% { opacity: 0; transform: matrix3d(0.1, 0, 0, 0, 0, 0.1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } | |
3.4% { opacity: 1; transform: matrix3d(0.384, 0, 0, 0, 0, 0.466, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } | |
4.7% { transform: matrix3d(0.505, 0, 0, 0, 0, 0.639, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } | |
6.81% { transform: matrix3d(0.693, 0, 0, 0, 0, 0.904, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } | |
9.41% { transform: matrix3d(0.895, 0, 0, 0, 0, 1.151, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } | |
10.21% { transform: matrix3d(0.947, 0, 0, 0, 0, 1.204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } | |
13.61% { transform: matrix3d(1.111, 0, 0, 0, 0, 1.299, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } | |
14.11% { transform: matrix3d(1.127, 0, 0, 0, 0, 1.298, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } | |
17.52% { transform: matrix3d(1.187, 0, 0, 0, 0, 1.216, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } | |
18.72% { transform: matrix3d(1.191, 0, 0, 0, 0, 1.169, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } |
export class HttpClient { | |
constructor(defaults) { | |
this.defaults = defaults; | |
this.interceptors = []; | |
this.activeRequestCount = 0; | |
this.isRequesting = false; | |
} | |
addInterceptor(interceptor) { | |
this.interceptors.push(interceptor); |
fetch has yet to provide a standard way of aborting a request. Therefore, there's no way to implement connection timeout. (#27) | |
fetch has failed to provide an API to set response timeout. (#20) | |
...which means that you'll have to wait until the end of the response or the occurrence of a network error. | |
...or, use setTimeout or Promise.race to manually reject the returned promise if you need a timeout. And it has a tiny side effect (#175): | |
mislav commented on 29 Jul 2015 | |
Also note that with the above implementation, even if the timeout happens, the original request won't be aborted because we don't have an API to abort fetch requests. Instead, the request will complete in the background but its response will get discarded. |
{"lastUpload":"2017-12-06T20:04:26.928Z","extensionVersion":"v2.8.6"} |
As configured in my dotfiles.
start new:
tmux
start new with session name:
It's time someone compiled a list of nationalities to use within a web application. This gist attempts to make a first move at that.
##List of countries
I've also compiled a list of countries
{"lastUpload":"2017-12-07T16:36:41.624Z","extensionVersion":"v2.8.6"} |
{"lastUpload":"2019-09-30T12:12:18.828Z","extensionVersion":"v3.4.3"} |
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.xml with the following command: | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:4443 | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl |