| title | tags | authors | |||||
|---|---|---|---|---|---|---|---|
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily |
|
|
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
| //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// | |
| // Bit manipulation macros // | |
| //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// | |
| //Extract bytes from integers, floats & doubles | |
| #define Lo(param) ((char *)¶m)[0] //0x000y | |
| #define Hi(param) ((char *)¶m)[1] //0x00y0 | |
| #define Higher(param) ((char *)¶m)[2] //0x0y00 | |
| #define Highest(param) ((char *)¶m)[3] //0xy000 |
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
| import serial | |
| import csv | |
| import re | |
| import matplotlib.pyplot as plt | |
| import pandas as pd | |
| portPath = "/dev/ttyACM0" # Must match value shown on Arduino IDE | |
| baud = 115200 # Must match Arduino baud rate | |
| timeout = 5 # Seconds | |
| filename = "data.csv" |
How to Ignore Merge Conflicts for Specific Files in a Git Repository
Create a directory and git init it
$ mkdir merge-test
$ cd merge-test/
$ git init
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
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
| +---\/---+ | |
| PB5 |1* 8| VCC | |
| PB3 |2 7| PB2 | |
| PB4 |3 6| PB1 | |
| GND |4 5| PB0 | |
| +--------+ |
This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.
Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.
Use the Raspberry Pi Configuration tool or sudo raspi-config to:
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
| alias quit='osascript -e "do shell script \"osascript -e \\\"tell application \\\\\\\"Terminal\\\\\\\" to quit\\\" &> /dev/null &\""; exit' |
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
| /* Code courtesy of RayLivingston from the Arduino forums (http://forum.arduino.cc/index.php?topic=404908.msg2787555#msg2787555) */ | |
| void ShowMemory(void) | |
| { | |
| struct mallinfo mi=mallinfo(); | |
| char *heapend=sbrk(0); | |
| register char * stack_ptr asm("sp"); | |
| pConsole->printf(" arena=%d\n",mi.arena); | |
| pConsole->printf(" ordblks=%d\n",mi.ordblks); |
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
| void(* resetFunc) (void) = 0; //declare reset function @ address 0 | |
| resetFunc(); //Call to reset |