Skip to content

Instantly share code, notes, and snippets.

Avatar

Fabio AM fabioam

View GitHub Profile
@fabioam
fabioam / iptv-reverbtv.m3u
Last active Aug 30, 2016
Canais IPTV nacionais abertos
View iptv-reverbtv.m3u
#EXTM3U
#EXTINF:0 group-title="TV", ALL SPORTS
http://173.236.10.10:1935/dgrau/dgrau/live.m3u8
#EXTINF:0 group-title="TV", BAND
http://evp.mm.uol.com.br:1935/bandpracas/bandcidaders/playlist.m3u8
#EXTINF:0 group-title="TV", Band Sports
http://evp.mm.uol.com.br:1935/geob_terraviva/operadoras/live.m3u8?BRASILIPTV
@fabioam
fabioam / bash-findmvsequential.sh
Last active Aug 30, 2016
Localiza todas as imagens, e move para o diretório raiz incluindo um prefixo
View bash-findmvsequential.sh
find . -name '*.jpg' \
> | awk 'BEGIN{ a=0 }{ printf "mv \"%s\" %04d.jpg\n", $0, a++ }' \
> | bash
# fonte: http://stackoverflow.com/questions/3211595/renaming-files-in-a-folder-to-sequential-numbers
@fabioam
fabioam / wp-admin-add.sql
Created Aug 30, 2016
wordpress - adicionado usuario admin
View wp-admin-add.sql
Adicionar usuario admin
-----------
INSERT INTO `wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('749', 'czd', MD5('123456'), 'Your Name', 'fabio@doo.is', 'http://www.test.com/', '2011-06-07 00:00:00', '', '0', 'Your Name');
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '749', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '749', 'wp_user_level', '10');
@fabioam
fabioam / gist:3b47f84fac0a8e4f5b7bffc9b5109647
Last active Feb 3, 2017
Zoneminder export mp4 from images (events)
View gist:3b47f84fac0a8e4f5b7bffc9b5109647
#/bin/bash
#
# Export ZoneMinder events (images) into MP4 file
# Execute this script inside events/ directory
# directory where MP4 videos should be exported
EXPORT_VIDEO_PATH="/home/user/zoneminder/mp4"
for camera in $(find -maxdepth 1 -type l |sort); do
@fabioam
fabioam / .bashrc
Last active Feb 3, 2018
bashrc with some alias and functions
View .bashrc
#
# ~/.bashrc
#
[[ $- != *i* ]] && return
colors() {
local fgc bgc vals seq0
printf "Color escapes are %s\n" '\e[${value};...;${value}m'
@fabioam
fabioam / instagram-portrait-convert.sh
Created Nov 4, 2017
Convert mp4 video to instagram portrait format (720wx1080h)
View instagram-portrait-convert.sh
#!/bin/bash
# 99% of credits by https://unix.stackexchange.com/a/192021/235601
if [ "$#" -ne 1 ]
then
echo "Description: Convert mp4 file to instagram portrait format (720wx1080h)"
echo "Usage: $0 <filename>"
exit 1
fi
@fabioam
fabioam / instagram-split-in-14s.sh
Created Nov 4, 2017
Description: Split mp4 video 14s with each - for using with instagram stories
View instagram-split-in-14s.sh
#!/bin/bash
if [ "$#" -ne 1 ]
then
echo "Description: Split mp4 file with 14s each - for using with instagram stories"
echo "Usage: $0 <filename>"
exit 1
fi
echo $1
@fabioam
fabioam / Gulpfile.js
Last active Jan 28, 2018
Simple gulp file example using gulp-livereload
View Gulpfile.js
/*
* Simple gulp file using gulp-livereload
* $ gulp -v
* CLI version 3.9.1
* Local version 3.9.1
*
* run example:
* $ gulp watch
*
* if you have errors, check first if you have fs.inotify.max_user_watches configured appropriate
@fabioam
fabioam / docker-normal-user.sh
Created Feb 3, 2018
Docker as a normal user
View docker-normal-user.sh
$ sudo usermod -aG docker $USER
$ sudo setfacl -m user:$USER:rw /var/run/docker.sock
@fabioam
fabioam / docker-destroy-all.sh
Created Feb 5, 2018 — forked from JeffBelback/docker-destroy-all.sh
Destroy all Docker Containers and Images
View docker-destroy-all.sh
#!/bin/bash
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)