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 help // List all comands | |
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader |
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
/* find the pid of the program (via ps) and look at /proc/$THIS_PID/maps */ | |
#include <assert.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/mman.h> | |
int main() { | |
long page_size = sysconf(_SC_PAGE_SIZE); |
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> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/file.h> | |
#include <assert.h> | |
#include <fcntl.h> | |
#include <errno.h> | |
#include <termios.h> | |
#include <unistd.h> | |
#include <sys/event.h> |
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
Help : https://devhints.io/ | |
#List local available images | |
$ docker images | |
$docker run <image> | |
$docker run -d <image> = run in disconnected / daemon mode |
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
KEYBINDINGS | |
byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used). The common key bindings | |
are: | |
F2 - Create a new window | |
F3 - Move to previous window | |
F4 - Move to next window |
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
Compile Source Code with -g to load debugging symbols : | |
Example : gcc -g -o hellow helloworld.c | |
GDB Debugging : | |
$ gdb a.out | |
gdb) b main |
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
Why 64 bits is AMD64 and 32 bit is i386? | |
i386: Intel initially called metonymy specification IA-32(Intel Architecture 32 bit) invented by Intel. IA-32e and EM64T then later settled with "Intel 64". | |
AMD64: AMD developed 64 bit ISA, At this time Intel was developing Itanium, Later intel also adopted AMD's 64 bit ISA.Intel 80386's instruction set programming model and binary encodings are still the common denominator for all 32-bit processors and hence i386, a.k.a x86 or IA-32.other names being x64, x86_64, x86-64. |
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
git log | |
git reset --hard HEAD~1 // for latest | |
git reset --hard <sha1-commit-id> // for commit ID or specific 5th commit HEAD~5 | |
git log | |
git push origin HEAD --force |
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
1. Clone your fork: | |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git | |
2. Add remote from original repository in your forked repository: | |
cd into/cloned/fork-repo | |
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git | |
git remote -v | |
git fetch upstream | |
3. Updating your fork from original repo to keep up with their changes: |