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
| # bash script that generates a slide show from a file | |
| # sudo apt-get install imagemagick libav-tools rar | |
| # usages | |
| # text2slideshow.sh [textfile] [number of lines] | |
| # text2slideshow.sh index.html 10 | |
| wc -l $1 | |
| rm *.jpg | |
| rm *.mp4 |
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/bash -x | |
| # Script that generates an image, then creates video file with audio. Was created for uploading audio to Youtube. | |
| # You'll need ffmpeg and imageMagick (and ghostscript on OsX) | |
| # | |
| # example usage: | |
| # audio2video.sh Music.wav "Big Label!" | |
| TEXT=$2 | |
| AUDIOFILE=$1 | |
| IMAGE=background.png |
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
| # usage: | |
| # . record.sh 300 "hw:2,0" | |
| # http://ubuntuforums.org/archive/index.php/t-224748.html | |
| DATE=$(date "+%Y.%m.%d-%H.%M.%S") | |
| DURATION=${1:-600} | |
| HW=${2:-"hw:2,0"} | |
| arecord -d $DURATION -D $HW -f cd -t raw | oggenc - -r -o $DATE.ogg |
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/bash | |
| HEAD=$(git rev-parse --short HEAD) | |
| GIT_ROOT=$(git rev-parse --show-toplevel) | |
| DIRNAME=${GIT_ROOT##*/} | |
| NAME="${DIRNAME}_$HEAD.zip" | |
| 7z a -tzip $GIT_ROOT/../$NAME -w $GIT_ROOT/../$DIRNAME | |
| echo "Wrote $GIT_ROOT/../$NAME" |
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
| #!/usr/bin/env python | |
| # Prototyped with Barcode Scanner on Android and the "custom search" url | |
| # https://play.google.com/store/apps/details?id=com.google.zxing.client.android&hl=en_GB | |
| # | |
| # Routes: | |
| # http://[ip-address]:5001/ | |
| # http://[ip-address]:5001/add/[barcode] | |
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
| #!/usr/bin/env bash | |
| # Turn on one-wire support for rPi | |
| # https://learn.adafruit.com/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing/ds18b20 | |
| cat /sys/bus/w1/devices/28*/w1_slave |\ | |
| grep t= | awk -F't=' '{print $2}' | \ | |
| python3 -c 'import sys; sys.stdout.write( str( float(sys.stdin.read())/1000 ) )' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| """ | |
| Simple timer function decorator | |
| """ | |
| import time | |
| def timeme(func): | |
| def inner(*args, **kwargs): | |
| fname = func.func_name | |
| start = time.clock() |
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
| APPNAME=My Sketchup Plugin | |
| DISTNAME=MyPlugin | |
| BUILDDIR = build | |
| DISTDIR = dist | |
| SRCDIR = src | |
| ENCRYPTOOL = /Applications/SketchupScrambler | |
| GIT_DIR = $(shell git rev-parse --show-toplevel) |
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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <!-- Required meta tags --> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <!-- Bootstrap CSS --> | |
| <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"> |
OlderNewer