Description | Command |
---|---|
Start a new session with session name | screen -S <session_name> |
List running sessions / screens | screen -ls |
Attach to a running session | screen -x |
Attach to a running session with name | screen -r <session_name> |
Install android SDK (bottom of the page) or full android studio if you need to develop on android.
fastboot
looks like adb
but it is used when device is in bootloader
(or fastboot).
This file contains hidden or 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
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader | |
== Shell |
This file contains hidden or 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 <stdio.h> | |
typedef unsigned int DWORD; | |
typedef unsigned short WORD; | |
inline DWORD | |
SwapWords (DWORD val) | |
{ | |
WORD * p = (WORD*) &val; | |
WORD t; |
This file contains hidden or 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
-- What queries are running more than a second? -- | |
SELECT pid FROM pg_stat_activity | |
WHERE pg_stat_activity.usename = 'username' | |
AND query != '<IDLE>' | |
AND query NOT ILIKE '%pg_stat_activity%' | |
AND age(clock_timestamp(), query_start) > '00:00:01'; | |
-- Kill queries that are running more than 5 minutes -- | |
WITH pgg AS ( | |
SELECT pid |
This file contains hidden or 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
# run bash inside the docker container | |
docker exec -it $containerid bash | |
# for example: | |
# $ psql -U $postgresuser | |
# run bash in pod | |
kubectl exec -it $podname -- /bin/bash |
This file contains hidden or 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 | |
export PREFIX="/usr/local/avr" | |
export EXTRAS="/usr/local/extras" | |
export INITIALDIR="/path/to/dev/folder/avr" | |
mkdir $PREFIX | |
mkdir $EXTRAS | |
# -------------- Binutils |
GNU Octave is a high-level interpreted language, primarily intended for numerical computations.
(via GNU Octave)
- not equal
~=
- logical AND
&&
This file contains hidden or 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 | |
git branch | grep -ve " master$" | xargs git branch -D |
NewerOlder