View style.css
.box {
width: 100%;
height: 200px;
background: #0B0D2C;
position: relative;
.box:after {
content: '';

Linux sudo GUI prompt

useful for applications that need to run scripts as root

(default ubuntu)

/usr/bin/pkexec --disable-internal-agent /bin/echo 'foo'
ps aux | grep -i "Chrome" | awk '{print $2}' | xargs sudo kill
View tail.js
const {spawn} = require('child_process')
const proc = spawn('tail', ['-f', 'events.log'])
proc.stdout.on('data', data => {
View index.js
fs.readFile('./certs/client.crt', 'utf8', (error, data) => {
const re = /[\s\S]*-----BEGIN CERTIFICATE-----\n([\s\S]*)\n-----END CERTIFICATE-----[\s\S]*/gi;
const cert = data.replace(re, '$1');
View random.js
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;

This command will show you the certificate (use -showcerts as an extra parameter if you want to see the full chain):

openssl s_client -connect

This will get the certificate and print out the public key:

openssl s_client -connect | openssl x509 -pubkey -noout

GNU screen quick reference

How to Navigate, copy & paste content?

within screen sessions: Cntl a + [ : To start navigation using up/down arrow Press Space bar: To select content starting position

View example.js
View exists.js
var fs = require('fs');
var path = __dirname;
var filename = 'test.txt';
var files = fs.readdirSync(path);
var exists = files.includes(filename);
// true if file on disk is "test.txt",
// false if file on disk is "TEST.txt"