Skip to content

Instantly share code, notes, and snippets.

View robzr's full-sized avatar

Rob Zwissler robzr

View GitHub Profile
@beriberikix
beriberikix / apa102_raindbow_attiny85.ino
Created December 7, 2015 22:21
Demo using Pololu's APA102 library with an ATTiny85 @ 16 MHz.
/* This is a fork of the Raindbow sample from
* https://github.com/pololu/apa102-arduino/blob/master/examples/Rainbow/Rainbow.ino
* to work on an ATTiny85 @ 16MHz. While there is no license in the file, the overall
* library appears to be under MIT:
* https://github.com/pololu/apa102-arduino/blob/master/LICENSE.txt
*/
#include <avr/power.h>
#include <APA102.h>
@docwhat
docwhat / Jenkinsfile
Last active December 16, 2023 13:53
Example pipeline usage of the Jenkins Mask Passwords plugin
// Requires https://plugins.jenkins.io/mask-passwords to run
/**
* Runs code with secret environment variables and hides the values.
*
* @param varAndPasswordList - A list of Maps with a 'var' and 'password' key. Example: `[[var: 'TOKEN', password: 'sekret']]`
* @param Closure - The code to run in
* @return {void}
*/
def withSecretEnv(List<Map> varAndPasswordList, Closure closure) {
@svet-b
svet-b / ext4_mac_docker.md
Created May 10, 2021 19:33
Mount and edit SD card image with ext4 partitions on Mac using Docker

Go to the directory with the image you want to work with. Run a Docker container with that directory mounted:

docker run -it --privileged -v /dev:/dev -v (pwd):/tmp --workdir /tmp ubuntu bash

(replace (pwd) with "$PWD" if using bash instead of fish)

See this thread for an explanation of why --privileged and -v /dev:/dev are required. The need for the latter can be avoided with this alrternative workaround.

In the container, assuming that $IMAGE_FILE is the name of your image file: