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
/** | |
* Parses a cli command, e.g. "mov a b -p all 'C:/user/me'" | |
* Example result of `mov -p 1000 -a "f and b" "/s/d/l" -l`: | |
* | |
* { | |
* "cmd": "mov", | |
* "params": { | |
* "p": "1000", | |
* "a": "f and b", | |
* "l": "" |
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
function searchFor(val, s, all = true) { | |
const results = []; | |
const handleValue = (key, value, p) => { | |
const da = typeof key === 'string' && key.match(/^[_a-zA-Z][\w\d_]*$/); | |
const query = p + (da ? `.${key}` : `[${key}]`); | |
if (value === s) { | |
return query; | |
} else if (typeof value === 'object') { |
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
const lookUpObjectValue = (obj, str) => { | |
const validProp = c => (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c === '_'; | |
const isNum = c => c >= '0' && c <= '9'; | |
const errored = i => { | |
const cursor = `${str}\n${' '.repeat(i)}^`; | |
console.error(`Invalid accessor:\n${cursor}`); | |
}; | |
const length = str.length; |
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
package classes; | |
public class ConsoleProgressBar { | |
private double minValue; | |
private double maxValue; | |
private int barSize; | |
private int barPos; | |
private char[] loading = {'|', '\\', '-', '/'}; |
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
# Stop Running containers | |
docker stop $(docker ps -a -q) | |
# Remove container and images | |
docker rm $(docker ps -a -q) | |
docker image rm $(docker image ls -a -q) | |
# See if everything got removed | |
docker image ls | |
docker container ls |
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 | |
BRANCH="gh-pages" | |
echo "[DGP] Deploying to github-pages (branch $BRANCH)..." | |
# Check if there are current changes | |
if [[ "$(git status --porcelain --untracked-files=no)" ]]; then | |
echo "[DPG] Please undo your current changes." | |
exit | |
fi |
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
// ==UserScript== | |
// @name DuckDuckNoAds | |
// @version 1.0 | |
// @namespace http://tampermonkey.net/ | |
// @description Hides duckduckgo ads | |
// @match https://duckduckgo.com/* | |
// @grant none | |
// @run-at document-end | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name GitHub contribution hints | |
// @version 1.0 | |
// @namespace http://tampermonkey.net/ | |
// @description A few more infos about your contribs on the front page | |
// @match https://*.github.com/* | |
// @grant none | |
// @run-at document-end | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name GitHub auto confirm | |
// @version 1.0 | |
// @namespace http://tampermonkey.net/ | |
// @description Automatically inserts your repo name in dialogs | |
// @match https://*.github.com/* | |
// @grant none | |
// @run-at document-end | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name Kraken speech | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://trade.kraken.com/* | |
// @grant none | |
// ==/UserScript== |
OlderNewer