Skip to content

Instantly share code, notes, and snippets.

@Graunephar
Graunephar / gist:60ca03be519c6653ed88e3dc14ed9703
Last active July 17, 2023 11:20
Nifty unix terminal commands

Troubleshooting

lsof | grep "Arc" - See which files a spoecific program accessses

Files and folders

ditto [source] [destination] -Merge folders and subfolders together

diff -rq /path/to/folder1 /path/to/folder2 - Se the diference between two folders

@Graunephar
Graunephar / AdbCommands
Created February 9, 2023 11:31 — forked from ernestkamara/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
@Graunephar
Graunephar / this_in_react.md
Created February 16, 2022 12:41 — forked from amitai10/this_in_react.md
How to use "this" keyword in JavaScript in general and react in particular

Using "this” in react functions

JavaScript is great, but comparing to other programing languages it has many confusing parts. One of them is the use of this.

In this blog post I will explain how to use it right, and what are the tools that JavaScript provide us to ease the use of it. In the end, I will focus on react.

3 types of functions

Get a list of all projects gcloud projects list

Choose a project to work on gcloud config set project $MY_PROJECT_ID

See which project is active gcloud config get-value project

Den fede gource commando

gource -1280x720 --key --camera-mode overview --seconds-per-day .1429 --auto-skip-seconds 1 --title "WelcomeBob Master" -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.mp4

"-o -" Sender output til std.out således at ffmpeg kan fange det. Vil man kun se visualiseringen på skærmen kan man derfor fjerne alt efter -o

0.1429 sekunder er 1 / 7 dvs at en uge er et sekund. Alternativt kan den sættes op for langsommere visualisering

#define NOTE_B0 31
#define NOTE_C1 33
#define NOTE_CS1 35
#define NOTE_D1 37
#define NOTE_DS1 39
#define NOTE_E1 41
#define NOTE_F1 44
#define NOTE_FS1 46
#define NOTE_G1 49
#define NOTE_GS1 52
@Graunephar
Graunephar / gitflowrebasing.md
Created May 11, 2021 08:59 — forked from markreid/gitflowrebasing.md
git flow with rebasing
@Graunephar
Graunephar / curl.md
Created April 5, 2021 15:07 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.