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
Move a group of components around a schematic: | |
move (>0 0) (0 -0.5); | |
Generate statistics of a board: | |
run length-freq-ri | |
Smash all & Change the typeface, ratio, and size of all elements: | |
group all; smash (> 0 0); change font vector (>0 0); change ratio 8 (>0 0); change size 0.07 (>0 0); |
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
The first draft is for the writer. The second draft is for the editor. The last draft is for the reader. | |
Emphasize how much work you have ahead of you to make this a good book. | |
Only a good writer would be able to say that. | |
If you would only defer to the narrative, you could get away with murder. | |
Most mysterious of all is the hidden middle stage, the offstage act of editing. | |
The first draft is for the writer. The second draft is for the editor. The last draft is for the reader. |
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
# http://stackoverflow.com/questions/6491532/how-to-subset-a-file-select-a-numbers-of-rows-or-columns | |
cat largefile | awk 'NR >= 10000 && NR <= 100000 { print }' |
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
#!/bin/bash | |
# This scripts pops up a notification in X if your RAM is occupied more | |
# than a certain value (default: 90%). | |
# Memory is checked every 30 seconds. | |
checkmemory () { | |
while | |
sleep 30 | |
FREE=`free -tw | grep Mem | tr -s ' ' | cut -d ' ' -f 4` | |
USED=`free -tw | grep Mem | tr -s ' ' | cut -d ' ' -f 3` |
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 |
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
#!/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
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
#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
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 |