Skip to content

Instantly share code, notes, and snippets.

View rewida17's full-sized avatar
💭
Hard working 😄

rewida17

💭
Hard working 😄
  • Poland
View GitHub Profile
#!/bin/bash
#ENJOY
DL(){
conversations_http_downloader.py "$a"
}
#We are in /tmp?
if ! [[ "$PWD" == '/tmp' ]]
then
echo 'Go to /tmp'
@rewida17
rewida17 / lcd_write.sh
Created May 5, 2018 12:09
Write text to HD44780 via PCF8574T
#!/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
@rewida17
rewida17 / airly.sh
Last active April 2, 2018 18:12
Shell based AIRly user iface
#!/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'
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
@rewida17
rewida17 / BBC_HLS_RECORD.sh
Last active February 20, 2018 15:35 — forked from John07/HLS_dvr.sh
A small script to make recording http live streams ( HLS ) on a Linux. Script records the stream for a defined period of time and sends the user notifications if anything goes wrong and once it's done.
#!/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
@rewida17
rewida17 / md5comp
Created February 1, 2018 15:01
MD5 compare files #BASH #AWK #MD5
#!/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}')"
@rewida17
rewida17 / linux_pl
Created January 17, 2018 12:51
Konwenter stron manuali z linux.pl ISO-8859-2 => UTF8
#!/bin/bash
curl http://www.linux.pl/man/index.php?command="$1" |enca -x utf8 |sed 's/iso-8859-2/utf-8/' > /tmp/linux.html
@rewida17
rewida17 / ip.sh
Created January 6, 2018 00:55
Get yours actuall IP addr on Iface
#!/bin/bash
ip addr | grep -i "wls3" | tail -n1 |sed "s/inet//g" | sed "s/\/24/\\n/g" | head -n1
#How it`s work
#Print info about network Iface ( print using \n not \f and only IPv4 address)
#ip -0 -4 addr|\
#Get some info about specific Iface
#grep -i "wls3" |\
@rewida17
rewida17 / sed cheatsheet
Created January 6, 2018 00:10 — forked from ssstonebraker/sed cheatsheet
Sed Cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@rewida17
rewida17 / mpv.conf
Last active January 19, 2018 21:09
My private config file for mpv using hardware acceleration on ThinkPad T60 (+youtube-dl)
#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