Steps:
-
Create Digital Ocean Droplet with Dokku v0.3.16 on 14.04 image
-
Login into the droplet and Update local settings.
sh -c "echo 'LANG=en_US.UTF-8\nLC_ALL=en_US.UTF-8' > /etc/default/locale" reboot
| Function::define = (prop, desc) -> | |
| Object.defineProperty this.prototype, prop, desc | |
| class GetterSetterTest | |
| constructor: (@_obj = {}) -> | |
| # 'obj' is defined via the prototype, the definition proxied through | |
| # to 'Object.defineProperty' via a function called 'define' providing | |
| # some nice syntactic sugar. Remember, the value of '@' is | |
| # GetterSetterTest itself when used in the body of it's class definition. |
| <?xml version="1.0" encoding="utf-8"?> | |
| <project> | |
| <!-- <meta /> | |
| Use meta nodes to set metadata for your application. The description is ignored | |
| on most targets, but is useful for packaging like Chrome Apps or Opera Widgets. | |
| For compatibility with Android and webOS, the package name must include at least |
| package; | |
| import flash.Lib; | |
| import openfl.utils.JNI; | |
| class SystemPath { | |
| var socket = io.connect('http://localhost'); | |
| var startTime; | |
| setInterval(function() { | |
| startTime = Date.now(); | |
| socket.emit('ping'); | |
| }, 2000); | |
| socket.on('pong', function() { | |
| latency = Date.now() - startTime; |
Steps:
Create Digital Ocean Droplet with Dokku v0.3.16 on 14.04 image
Login into the droplet and Update local settings.
sh -c "echo 'LANG=en_US.UTF-8\nLC_ALL=en_US.UTF-8' > /etc/default/locale"
reboot
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent| // This will open up a prompt for text to send to a console session on digital ocean | |
| // Useful for long passwords | |
| (function () { | |
| var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split(""); | |
| function f() { | |
| var character = t.shift(); | |
| var i=[]; | |
| var code = character.charCodeAt(); | |
| var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1 |
| if (typeof window!=='undefined' && navigator.serviceWorker && navigator.serviceWorker.controller) { | |
| let reloadOnNext = false; | |
| let pushState = history.pushState; | |
| history.pushState = function(state, title, url) { | |
| pushState.call(this, state, title, url); | |
| if (reloadOnNext===true) location.reload(true); | |
| }; | |
| navigator.serviceWorker.controller.addEventListener('statechange', e => { |
| type Program<T> = Read<T> | Write<T> | Done<T>; | |
| interface Read<T> { | |
| kind: "Read"; | |
| next: (data: T) => Program<T>; | |
| } | |
| interface Write<T> { | |
| kind: "Write"; | |
| valToWrite: string; |
iperf3 serverwg-quick down wg0/etc/wireguard/wg0.conf file