This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
DEPLOYMENTS="$1" | |
NUMBER_OF_REPLICAS="${2:-1}" | |
API_SERVER="https://kubernetes.default.svc" | |
SERVICE_ACCOUNT_FOLDER="/var/run/secrets/kubernetes.io/serviceaccount" | |
NAMESPACE=$(cat ${SERVICE_ACCOUNT_FOLDER}/namespace) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://github.com/PrivateBin/PrivateBin | |
if [ ! -f ./conf.ini ]; then | |
curl https://github.com/PrivateBin/PrivateBin/blob/master/cfg/conf.sample.php \ | |
--output ./conf.ini | |
fi | |
mkdir -p tpl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Source: https://github.com/Morganamilo/paru/issues/707#issuecomment-1116491359 | |
# e.g. paru or yay | |
AUR_HELPER="paru" | |
$AUR_HELPER -Sy | |
g='/Version/{print $3}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"start": "ts-node scripts/start-cra" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Ocassionally moves mouse to a random location | |
; Use Win+z to enable/disable | |
Pause On ; Start paused | |
Loop | |
{ | |
Random, x, -10, 10 | |
Random, y, -10, 10 | |
Random, SleepDelay, 600, 18000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Accessing values in maps, keyword lists, and structs | |
# 1. using . they key can’t be missing, works with structs or maps, but not with keyword lists | |
# 2. using […] works on maps and keyword lists, but not structs. Key can be missing and i’ll return nil | |
# 3. Map.get(…) works on maps and structs, but not keyword lists. will return nil if key is missing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include deps: | |
# {:earmark, "~> 1.4"}, | |
# {:html_sanitize_ex, "~> 1.4"}, | |
defmodule Utils.Markdown do | |
@earmark_options %Earmark.Options{ | |
code_class_prefix: "lang-", | |
smartypants: false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var foo = function() { console.log('bar'); }; | |
function foo() { console.log('baz'); } | |
foo(); // 'baz' or 'bar' ? | |
/* | |
JS isn't really interpreted anymore like truly interpreted languages such as bash. | |
JS is actually compiled in modern browsers and node into machine code using just-in-time compilation before executing it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// reference: https://stackoverflow.com/q/1382107 | |
/** | |
* @description ES6 | |
*/ | |
class CustomError extends Error { | |
/** | |
* | |
* @param {string} message | |
* @param {number} code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"python.linting.pylintEnabled": false, | |
"python.linting.enabled": true, | |
"python.formatting.provider": "black", | |
"python.pythonPath": "~/.virtualenvs/<project_name>/bin/python", | |
"python.linting.flake8Enabled": true | |
} |