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
#Configure for HW acceleration | |
#Put this stuff in ~/.config/mpv/mpv.conf | |
#My ThinkPad use Radeon X1400 | |
#Add this in bashrc: | |
#export LIBVA_DRIVER_NAME=vdpau # | |
#export VDPAU_DRIVER=r600 # test first w/o this variable | |
#Use in Arch | |
--hwdec=vdpau |
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 | |
#This part of script is responsible of checking the file | |
test(){ | |
f1="$(md5sum "$1" | awk '{print $1}')" | |
f2="$(md5sum "$2" | awk '{print $1}')" | |
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 | |
# required: ffmpeg notify-send or zenity ;) | |
# you can schedule this with launchd to run e.g. weekly | |
# Specify in seconds how long the script should record (default here is 1 hour). | |
seconds=3600 | |
#Specify in miliseconds notify timeout | |
notify=3000 | |
# Date format for the recording file name |
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
AN-308 TRIAC analog control circuits for inductive loads | |
http://www.st.com/content/ccc/resource/technical/document/application_note/bf/c5/c3/a5/3b/51/48/af/CD00003856.pdf/files/CD00003856.pdf/jcr:content/translations/en.CD00003856.pdf |
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 | |
APIK="apikey:Your Airly API KEY" | |
########################################################################### | |
# | |
json2txt(){ | |
sed 's/\\\\\//\//g' |\ | |
sed 's/[{}]//g' |\ | |
awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}'|\ | |
sed 's/[\,]/ /g' |\ | |
sed 's/\"//g' |
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/sh | |
# 2016 :p raphik | |
#Mirror!! | |
# Comando para LCD HD44780 + expansor I2C PCF8574T | |
# Sintaxis: lcd_write <línea> <texto> | |
#Source:http://foro.seguridadwireless.net/openwrt/proyecto-gpio-manejo-de-una-pantalla-lcd-via-bus-i2c/?action=printpage | |
# | |
func_init() # Init | |
{ | |
func_LCD I 0x33; func_LCD I 0x32; func_LCD I 0x28; func_LCD I 0x0C; func_LCD I 0x01 |
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 | |
#ENJOY | |
DL(){ | |
conversations_http_downloader.py "$a" | |
} | |
#We are in /tmp? | |
if ! [[ "$PWD" == '/tmp' ]] | |
then | |
echo 'Go to /tmp' |
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
ffmpeg -i input.mp4 \ | |
-map 0:1 \ | |
-c:a copy \ | |
-y output.m4a |
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/env bash | |
if ![[ -e ~/.config/mpv/mpf.conf]] | |
then | |
mkdir -pv ~/.config/mpv | |
echo 'LS1od2RlYz12YWFwaQotLXZvPXZhYXBpCi0teXRkbC1mb3JtYXQ9YmVzdHZpZGVvW2hlaWdodDw9PzcyMF1bZnBzPD0/NjBdW3Zjb2RlYyE9P3ZwOV0rYmVzdGF1ZGlvL2Jlc3QKLS12b2x1bWUtbWF4PTIwMAotLXNhdmUtcG9zaXRpb24tb24tcXVpdAo=' |base64 -d > ~/.config/mpv/mpv.conf | |
elif [[ -e ~/.config/mpv/mpv.conf]] | |
then | |
echo -e 'mpv.conf already exist, nothing to do.\\nBye :)' | |
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 | |
while IFS= read -r ip | |
do | |
snmpwalk -v1 -c public "${ip}" 1.3.6.1.4.1.14988.1.1.3.8.0 | awk -v ip="$ip" '{print ip"=>"$4/10"V"}' | |
done < <(cat ~/ip) |