Skip to content

Instantly share code, notes, and snippets.

@pingud98
pingud98 / recursive-m4v-convert.sh
Last active March 27, 2021 11:04 — forked from wechain/recursive-m4v-convert.sh
Recursively convert all files using HandbrakeCLI and save to new folder. Uses an old 720p format and mp3 audio
#!/bin/bash
#
# Change this to specify a different handbrake preset. You can list them by running: "HandBrakeCLI --preset-list"
#
#set -ux
set +e
PRESET="Amazon Fire 720p30" # tweaked to work on my folks old LG smart tv.
if [ -z "$1" ] ; then
TRANSCODEDIR="."
else
@pingud98
pingud98 / install.sh
Last active June 14, 2020 16:00 — forked from lukicdarkoo/install.sh
CosmicPi configuration script
#!/bin/bash
# Usage: curl https://gist.githubusercontent.com/lukicdarkoo/e33e00c6780ad0215d3932b810a10e46/raw | sh
echo "In case of any issues please consult cosmicpi.org for help, or contact us via Facebook "
echo "--- Expand the file system ---"
sudo resize2fs /dev/mmcblk0p2
echo "--- Update OS ---"
sudo apt -y update
@pingud98
pingud98 / CosmicPiV1_single_channel.ino
Last active September 23, 2018 23:01 — forked from heborras/CosmicPiV2_DUE_test_script.ino
A dev firmware for testing and characterizing the V2 board, SiPMs and slabs with an arduino DUE
/*work in progress - single channel mode for V1 cosmic Pi hardware.
to do - disable on board DAC (not used in V1, I2C instead)
Check pinouts for SPI/Single channel HV
Refer to V1 schematic from here:
https://www.ohwr.org/attachments/3847/CosmicPiV1point0.zip
*/
#include <SPI.h>
#include <Wire.h>
//updated to include a whole bunch of extra functions 120818
@pingud98
pingud98 / arduino-due_high-speed-ADC.ino
Created December 16, 2016 11:09 — forked from pklaus/arduino-due_high-speed-ADC.ino
Arduino Due: ADC → DMA → USB @ 1MSPS
#undef HID_ENABLED
// Arduino Due ADC->DMA->USB 1MSPS
// by stimmer
// from http://forum.arduino.cc/index.php?topic=137635.msg1136315#msg1136315
// Input: Analog in A0
// Output: Raw stream of uint16_t in range 0-4095 on Native USB Serial/ACM
// on linux, to stop the OS cooking your data:
// stty -F /dev/ttyACM0 raw -iexten -echo -echoe -echok -echoctl -echoke -onlcr