Skip to content

Instantly share code, notes, and snippets.

View smaslennikov's full-sized avatar
💭
i hereby identify as your excellency

Slava Maslennikov smaslennikov

💭
i hereby identify as your excellency
View GitHub Profile
________________________________________
/ Q: How many hardware engineers does it \
| take to change a light bulb? A: None. |
| We'll fix it in software. |
| |
| Q: How many system programmers does it |
| take to change a light bulb? A: None. |
| The application can work around it. |
| |
| Q: How many software engineers does it |
#!/bin/bash
LOCATION=/home/pi/vids
PART=/
while :; do
TEMP=$(/opt/vc/bin/vcgencmd measure_temp)
DATE=$(date +"%m-%d-%y-%T")
echo "! $DATE-$TEMP.h264 starting..."
sudo raspivid -t 1200000 -o $LOCATION/$DATE-$TEMP.h264
@smaslennikov
smaslennikov / sleepy vikings - twin peaks
Last active November 18, 2017 06:06
Lyrics of Twin Peaks by Sleepy Vikings on They Will Find You Here
in a dream it was summer
and i buried my head into
the back of your neck
the sun was high and we were
shadowless
drinking cold cokes on the front steps
i kept a telescope, i watched the skies for rain
loaded my pistol, promised "nothing ever has
to change"
1. No leftovers
2. Leftovers' havers lose
3. Others win
4. Submit your freedom to a YouTube recording
Prize: a pack of noodles
#!/bin/bash
LOCATION=/home/pi/vids
PART=/home
USB=0
while :; do
TEMP=$(/opt/vc/bin/vcgencmd measure_temp)
DATE=$(date +"%m-%d-%y-%T")
echo "! $DATE-$TEMP.h264 starting..."
#!/bin/bash
LOCATION=/home/pi/vids
PART=/home
USB=0
while :; do
TEMP=$(/opt/vc/bin/vcgencmd measure_temp)
DATE=$(date +"%m-%d-%y-%T")
echo "! $DATE-$TEMP.h264 starting..."
#!/bin/bash
function dagd {
if [ $1 -eq '-6' ]; then
curl -m 2 -s "http://da.gd/$2"
else
curl -m 2 -s -4 "http://da.gd/$2?strip"
fi
}
function remote_network {
# set some magical temporary stuff
#!/bin/bash
echo "----------------------"
date
temp=$(/opt/vc/bin/vcgencmd measure_temp | awk -F"=" '{print $2}' | awk -F"'" '{print $1}')
echo "temp.value $temp"
for volt in core sdram_c sdram_i sdram_p
do
voltage=$(/opt/vc/bin/vcgencmd measure_volts $volt | awk -F"=" '{print $2}' | tr -d "V")
echo "volt$volt.value $voltage"
done
# /etc/skel/.bashrc
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi
function _foreground_calc {
# reject these colors for being too dark
local reject=([0]=a [16]=a [17]=a [18]=a [19]=a [232]=a [233]=a [234]=a [235]=a [236]=a [237]=a [238]=a)