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
# These commands are intended to be copied and pasted, and run one at a time in a bash-like shell. Git Bash | |
# on Windows was used for testing, Linux bash should also be fine, and actually, even tcsh on vrac rhel | |
# machines is OK because the most complicated shell construct we use is a pipe, which is pretty universal. | |
# Change to the parent of all your source dirs. | |
#For me, this is something like /c/Users/rpavlik/Desktop/src on Windows using Git Bash | |
# Run this to see all the files we'll consider modifying. | |
# Make sure that they are all actually git config files. | |
# On Linux or other places with newer "find", you might have to replace "-path" with "-wholename". |
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
# See other gist https://gist.github.com/2227902 for info on how this works and how to be safe with it. | |
# In this case, instead of supplying a single command to sed, we tell it a file | |
# to load its commands from. I generated that file using the spreadsheet "RepositoryChanges" | |
# and ample use of the CONCATENATE function. | |
# Preview it. | |
find . -maxdepth 3 -path "*/.git/config" -print0 | xargs -0 sed -f repochange.sed | |
# Do it. | |
find . -maxdepth 3 -path "*/.git/config" -print0 | xargs -0 sed -i -f repochange.sed |
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 <Wire.h> | |
#include <string.h> | |
#undef int | |
#include <stdio.h> | |
uint8_t outbuf[6]; // array to store arduino output | |
int cnt = 0; | |
int ledPin = 13; |
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/sh | |
# In case of a moved MXE tree, this script can be run to | |
# generate a qt.conf file that will replace qmake's built-in | |
# paths and prefix with the new location. | |
# | |
# Script maintained at https://gist.github.com/gists/2501032 | |
# | |
# Ryan Pavlik <[email protected]> <[email protected]> | |
bindir=$(cd $(dirname ${0}) && pwd) |
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
Index: src/arguments.c | |
=================================================================== | |
--- src/arguments.c (revision 105) | |
+++ src/arguments.c (working copy) | |
@@ -72,6 +72,7 @@ | |
{ "at90usb647", tar_at90usb647, adc_AVR, 0x2FF9, 0x03eb, 0x10000, 0x2000, true, 128, true, false, 128, 0x0800 }, | |
{ "at90usb646", tar_at90usb646, adc_AVR, 0x2FF9, 0x03eb, 0x10000, 0x2000, true, 128, true, false, 128, 0x0800 }, | |
{ "at90usb162", tar_at90usb162, adc_AVR, 0x2FFA, 0x03eb, 0x04000, 0x1000, true, 128, true, false, 128, 0x0200 }, | |
+ { "at90usb162unor3",tar_at90usb162, adc_AVR, 0x2FEF, 0x03eb, 0x04000, 0x1000, true, 128, true, false, 128, 0x0200 }, | |
{ "at90usb82", tar_at90usb82, adc_AVR, 0x2FF7, 0x03eb, 0x02000, 0x1000, true, 128, true, false, 128, 0x0200 }, |
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/sh | |
# Pass it a .elf file | |
avr-nm --demangle --line-numbers --print-size --size-sort --reverse-sort $1 |
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
getJRE = function(ver, wantJDK) { | |
var wshShell = new ActiveXObject("WScript.Shell"); | |
var key = "HKLM\\SOFTWARE\\JavaSoft\\" + | |
(wantJDK ? "Java Development Kit\\" : "Java Runtime Environment\\") + | |
ver + | |
"\\JavaHome"; | |
//WScript.Echo(key); | |
try { |
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
hourly = 'H * * * * ' | |
daily = 'H H(0-7) * * *' | |
defaults = [ | |
frequency: daily, | |
noMinimizeUrl: false | |
] | |
def fillDefaults(themap) { | |
defaults.eachWithIndex{ defaultIt, i-> | |
if (!themap.containsKey(defaultIt.key)) { themap[defaultIt.key] = defaultIt.value } |
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
struct ThrowingErrorHandler { | |
template<typename ValueType> | |
struct GetterReturnType { | |
typedef ValueType type; | |
}; | |
inline static void handleError() { | |
throw std::runtime_error("Value not found in enumeration!"); | |
} |