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
1. Fire up the command prompt. | |
2.1. Execute: gcc send.c -o send | |
2.2. Execute: gcc recv.c -o recv | |
3. Execute: ./send <<< "Message." | |
4. Execute: ./recv |
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
// Source: http://supp.iar.com/FilesPublic/SUPPORT/000419/AN-G-002.pdf | |
unsigned int sqroot(unsigned int x){ | |
unsigned int a,b; | |
b = x; | |
a = x = 0x3f; | |
x = b/x; | |
a = x = (x+a)>>1; | |
x = b/x; | |
a = x = (x+a)>>1; |
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
# git clone <> | |
# cd <> | |
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done | |
git fetch --all | |
git pull --all |
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
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
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
#!/usr/bin/python | |
import sys | |
import os | |
os.system('meld "%s" "%s"' % (sys.argv[2], sys.argv[5])) |
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
#include <iostream> | |
using namespace std; | |
#define alignUp(value, factor) (((value + (factor - 1)) / factor) * factor) | |
#define alignDown(value, factor) ((value / factor) * factor) | |
int main(int c, char **v) | |
{ |
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
python -m compileall $1 |
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
INDEX=0 | |
while [[ 1 ]]; do | |
echo $INDEX | |
if [[ "$INDEX" == "3" ]]; then | |
INDEX=0 | |
else | |
let INDEX="$INDEX + 1" | |
fi | |
/opt/ipnc/renderImage /mnt/mmc/$INDEX.png | |
sleep 10s |
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
cat /proc/bus/input/devices | |
sudo cat /dev/input/event7 |
OlderNewer