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
# Sublime Text 3 languages list: | |
ls -1 /Applications/Sublime\ Text.app/Contents/MacOS/Packages/ | |
# Remove all default Sublime Text 3 snippets for Python language | |
export ST3_LANG="Python" | |
mkdir -p ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/$ST3_LANG/ | |
unzip -l /Applications/Sublime\ Text.app/Contents/MacOS/Packages/$ST3_LANG.sublime-package | grep '.sublime-snippet' | awk '{print $4}' | while read f; do touch ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/$ST3_LANG/$f; done | |
unset ST3_LANG |
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
/* Taken from https://www.cybercom.net/~dcoffin/dcraw/dcraw.c */ | |
/* Which itself attributes this algorithm to "Frank Markesteijn" */ | |
#define TS 512 /* Tile Size */ | |
#define fcol(row,col) xtrans[(row+6) % 6][(col+6) % 6] | |
void CLASS xtrans_interpolate (int passes) | |
{ | |
int c, d, f, g, h, i, v, ng, row, col, top, left, mrow, mcol; | |
int val, ndir, pass, hm[8], avg[4], color[3][8]; |
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 -e | |
if [ "$(uname -s)" != "Darwin" ] | |
then | |
echo "This script is for building a Debian x86_64 image to use on MacOS" | |
exit 1 | |
fi | |
TEMP="$(mktemp -d build.XXXXX)" | |
cp preseed.cfg $TEMP |
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
/// Extract the specified fields from the `Peripherals` struct into several named | |
/// structs which can be passed to other tasks to provide them with all their | |
/// resources, including pins, peripherals, DMA channels, etc. | |
/// | |
/// The `peripherals` module must be in scope when `resource_assigs!{}` is called, | |
/// and it defines a new macro `split_resources!()` which uses the `Peripherals` struct | |
/// and returns a new struct with a field for each of the structs named in `resource_assigs!{}`. | |
/// | |
/// Defines new structs containing the specified structs from the `peripherals` module, | |
/// a top-level struct that contains an instance of each of these new structs, and a macro |