After watching Bryan Cantrill's presentation on [Running Aground: Debugging Docker in Production][aground] I got all excited (and strangely nostalgic) about the possibility of core-dumping server-side Python apps whenever they go awry. This would theoretically allow me to fully inspect the state of the program at the point it exploded, rather than relying solely on the information of a stack trace.
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
interface bcm2835gpio | |
# hexdump -s4 -n4 -e '\"0x\" 4/1 \"%02X\"\"\\n\"\" \"' /proc/device-tree/soc/ranges | |
bcm2835gpio_peripheral_base 0x20000000 | |
# Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET | |
# These depend on system clock, calibrated for stock 700MHz | |
# bcm2835gpio_speed SPEED_COEFF SPEED_OFFSET | |
bcm2835gpio_speed_coeffs 146203 36 |
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/env bash | |
COMMAND=$1 | |
pushd `dirname $0` > /dev/null | |
DIR=`pwd -P` | |
popd > /dev/null | |
cd $DIR |
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
#----------------------------------------- | |
# NXP lpc1114fn23 Cortex-M0 32k flash, 4k ram | |
set CHIPNAME lpc1114 | |
set CPUTAPID 0x0BB11477 | |
set CPUROMSIZE 0x8000 | |
set CPURAMSIZE 0x1000 | |
# After reset the chip is clocked by the ~12MHz internal RC oscillator. | |
# When board-specific code (reset-init handler or device firmware) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
# Create a complete OS .dmg file (it needs the Apple Developers Tools installed) | |
# usage: | |
# pkg-create.sh <contents-root-folder> <package-name> <package-version> <vendor-string> | |
# | |
CONTENTS=$1 | |
shift | |
NAME=$1 | |
shift |
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/env sh | |
/usr/bin/screen -S reverse-ssh-tunnel -d -m /usr/bin/autossh -M 65500 -o "ServerAliveInterval 20" -R 2222:localhost:22 server |
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
version: "3" | |
services: | |
cron: | |
image: alpine | |
command: sh -c "echo '* * * * * task > /proc/1/fd/1 2> /proc/1/fd/2' | crontab - && crond -f" | |
volumes: | |
- ./task.sh:/usr/local/bin/task:ro |
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/env bash | |
sudo apt-get update && sudo apt-get install -y bc bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop maven openjdk-8-jdk pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-dev lib32z1-dev android-sdk | |
if `hash adb &>/dev/null`; then | |
echo "Android tools found..." | |
else | |
echo "Installing android tools..." | |
echo "y" | android update sdk -u -a --filter tools | |
echo "y" | android update sdk -u -a --filter platform-tools |
NewerOlder