jq is useful to slice, filter, map and transform structured json data.
brew install jq
/** | |
/* An attempt to make the error handling process described on Khalil Stemmler's excellent | |
/* blog a little somewhat simpler. | |
/* https://khalilstemmler.com/articles/enterprise-typescript-nodejs/functional-error-handling/ | |
/** | |
// Left and Right classes, but more specific to error handling. | |
class Failure<L, A = any> { | |
readonly error: L; |
` | |
~/ | |
~ | |
×™× | |
___ | |
__ | |
_ | |
--- |
//////// | |
// The vm module lets you run a string containing javascript code 'in | |
// a sandbox', where you specify a context of global variables that | |
// exist for the duration of its execution. This works more or less | |
// well, and if you're in control of the code that's running, and you | |
// have a reasonable protocol in mind// for how it expects a certain | |
// context to exist and interacts with it --- like, maybe a plug-in | |
// API for a program, with some endpoints defined for it that do | |
// useful domain-specific things --- your life can go smoothly. |
## IPv6 Tests | |
http://[::ffff:169.254.169.254] | |
http://[0:0:0:0:0:ffff:169.254.169.254] | |
## AWS | |
# Amazon Web Services (No Header Required) | |
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories | |
http://169.254.169.254/latest/meta-data/iam/security-credentials/dummy | |
http://169.254.169.254/latest/user-data | |
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME] |
These use separate document structures instead of HTML, some are more modular libraries than full editors
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 is outdated information, though the concepts are valid. A script implmenting these concepts for OpenConnect 8 on Ubuntu 18 (bionic) and 19 (eoan) is available
The steps in this guide are available as an autobuild shell script
HTML best practices Depends. How far down the rabbit hole do you want to go ?
Just need something to look good : use a frontend framework like foundation or bootstrap, won't learn much about CSS. Short list of Front End Frameworks
Surface level : work general to specific. Comment the sections of the CSS. Use a reset or normalizer. Work on patterns, use classes over IDs for reuse. CSS Resets - includes normalize.css Don't have links for the other parts. see below
Little bit deeper : Look into BEM or OOCSS. Those stand for Block Element Modifier and Object Oriented CSS. Two popular methodologies for CSS. Also SMACSS.
# coding=utf-8 | |
""" | |
LICENSE http://www.apache.org/licenses/LICENSE-2.0 | |
""" | |
import datetime | |
import sys | |
import time | |
import threading | |
import traceback | |
import SocketServer |