A collection of commands I find useful when working with Raspberry Pis. Some of these require external software.
uptime -p
Steve Aoki ████▏░░░░░░░░░░░░ 16 plays | |
NF ██░░░░░░░░░░░░░░░ 8 plays | |
Alan Walker █▊░░░░░░░░░░░░░░░ 7 plays | |
The Lonely Island █▊░░░░░░░░░░░░░░░ 7 plays | |
Crystal Rock █▎░░░░░░░░░░░░░░░ 5 plays | |
From Ashes to New █▎░░░░░░░░░░░░░░░ 5 plays | |
Illenium █▎░░░░░░░░░░░░░░░ 5 plays | |
Disciple █░░░░░░░░░░░░░░░░ 4 plays | |
Louis Tomlinson █░░░░░░░░░░░░░░░░ 4 plays | |
Ooyy █░░░░░░░░░░░░░░░░ 4 plays |
{ | |
"headers": [ | |
{ | |
"source": "/api/(.*)", | |
"headers": [ | |
{ "key": "Access-Control-Allow-Credentials", "value": "true" }, | |
{ "key": "Access-Control-Allow-Origin", "value": "*" }, | |
{ "key": "Access-Control-Allow-Methods", "value": "GET,OPTIONS,PATCH,DELETE,POST,PUT" }, | |
{ "key": "Access-Control-Allow-Headers", "value": "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version" } | |
] |
public class Dice { | |
/** | |
* Generate a random full number between 0 and the specified number. (Upper limit) | |
*/ | |
public static int roll(int pSides) { | |
return (int) Math.round(Math.random() * (pSides - 0)); | |
} | |
} |
del /S *.class | |
del /S *.ctxt |
public class Util { | |
/** | |
* Pauses the program | |
* @param pSeconds How long should the program be paused? | |
*/ | |
public static void wait(int pSeconds) { | |
try { | |
Thread.sleep(pSeconds * 1000); | |
} catch (InterruptedException ex) { | |
Thread.currentThread().interrupt(); |
⭐ Total Stars: 10 | |
➕ Total Commits: 1,427 | |
🔀 Total PRs: 241 | |
🚩 Total Issues: 137 | |
📦 Contributed to: 28 |
{ | |
"Create SvelteKit Route Component": { | |
"scope": "svelte", | |
"prefix": "sv", | |
"body": [ | |
"<script lang=\"ts\">\n\n</script>\n\n\n<svelte:head>\n <title></title>\n</svelte:head>\n\n\n<body>\n $1\n</body>\n\n\n<style type=\"text/postcss\">\n\n</style>" | |
], | |
"description": "Create a SvelteKit route component" | |
}, | |
"Create Tailwind style block": { |
def obersumme(n: int, f) -> None: | |
""" | |
Berechnet die Obersumme für `n` äquidistante Rechtecke mit der Funktion `f` im Intervall [0; 1] | |
`O(n) = 1/n * f(1/n) + 1/n * f(2/n) + 1/n * f(3/n) + ... + 1/n * f((n-1)/n) + 1/n * f(n/n)` | |
""" | |
term = 0 | |
for i in range(n + 1): | |
term += (1 / n) * f(i / n) |