Skip to content

Instantly share code, notes, and snippets.

View ctroncoso's full-sized avatar

Carlos Troncoso ctroncoso

View GitHub Profile
@ctroncoso
ctroncoso / smallify
Created June 17, 2016 02:54
Bulk encoding any video ffmpeg can read to small (archive) version mp4
#!/usr/bin/env bash
PROCESSED_PATH="~/completed/"
SMALLIFIED_PATH="~/compressed/"
for file in "$@"; do
echo ${file%\.*}
if ffmpeg -y -i "${file}" -r 24 -vf 'scale=320:-2' -vcodec libx264 -preset veryfast -crf 20 -c:a aac -strict -2 -b:a 128k "small_${file%\.*}.mp4"
then mv "small_${file%\.*}.mp4" $SMALLIFIED_PATH && mv "${file}" $PROCESSED_PATH
fi
@ctroncoso
ctroncoso / playlist.m3u8
Last active January 17, 2021 16:01
iptv m3u8 playlist
#EXTM3U
#EXTINF:-1, tvg-logo="" group-title="Leeme",- [COLOR cyan]actualizado 01/06/2016[/COLOR] -
http://127.0.0.1
#EXTINF:-1, tvg-logo="" group-title="Canales Chilenos", -[COLOR red]Canales Chilenos[/COLOR]-
http://127.0.0.1
#EXTINF:-1, tvg-logo="" group-title="Canales Chilenos", La Red (HD)
http://ec2-52-201-28-82.compute-1.amazonaws.com/lared/smil:lared.smil/playlist.m3u8
@ctroncoso
ctroncoso / dipa.rb
Created July 17, 2015 11:06
Parser para cámara de diputados
# uso
# ruby dipa.rb "http://diputados.cl/trabajamos/sala_votacion_detalle.aspx?prmId=21311"
require 'uri'
require 'open-uri'
require 'nokogiri'
require "awesome_print"
require 'yaml'
class VotacionesDiputados
@ctroncoso
ctroncoso / certgen.rb
Last active August 29, 2015 14:23 — forked from sheerun/certgen.rb
# Generates necessary certificates to ~/.docker
#
# Usage:
# bundle install
# ruby certgen.rb <domain>
require 'certificate_authority'
require 'fileutils'
if ARGV.empty?
@ctroncoso
ctroncoso / Villarrica_Calbuco_capture.sh
Last active August 29, 2015 14:22
Capturas volcanes.
#!/bin/bash
while true
do
TSF=$(date +\%Y-\%m-\%d_\%H-\%M-\%S)
TSG=$(date +\%Y-\%m-\%d_\%H:\%M:\%S)
CAM1="http://www.sernageomin.cl/camaras/Pucon/fija/pucon.jpg"
CAM2="http://www.sernageomin.cl/camaras/Calbuco/fija/calbuco.jpg"
CAM3="http://www.sernageomin.cl/camaras/Ulmo/fija/ulmo.jpg"
CAM4="http://www.sernageomin.cl/camaras/Llafen2/fija/llafenco.jpg"
@ctroncoso
ctroncoso / villarrica_tvn
Last active August 29, 2015 14:18
Captura TVN Villarrica
#!/bin/bash
set -e
NOW=$(date +\%Y-\%m-\%d_\%H-\%M-\%S)
NICENOW=$(date +"%Y-%m-%d %H:%M")
SECONDS=$(( (60 - $(date +\%M)) * 60 ))
echo "Starting capture"
@ctroncoso
ctroncoso / capture villarrica
Last active August 29, 2015 14:16
Script para captura de imágenes volcán Villarrica
#!/bin/bash
while true
do
TSF=$(date +\%Y-\%m-\%d_\%H-\%M-\%S)
TSG=$(date +\%Y-\%m-\%d_\%H:\%M:\%S)
echo
echo "Running $TSG"
echo "downloading"
wget --output-document=pucon_$TSF.jpg http://www.sernageomin.cl/camaras/Pucon/fija/pucon.jpg &> /dev/null
wget --output-document=vnv_$TSF.jpg http://www.sernageomin.cl/camaras/Vnv/fija/vnv.jpg &> /dev/null
( تاريخ مصرالحديث مع فذلكة في تاريخ مصرالقديم
-PROGRAMMABLE CONTROLLERS
-“. . . AND GULLIVER RETURNS” In Search of Utopia Book 6
...After a Few Words...
...Or Your Money Back
06-Imran Series-Neely Parandy
1
1 & 2 Samuel
1,000 Indian Recipes
1,000 Indian Recipes -
# Let's make a new folder for our torrents
mkdir new_torrents
# now we search for all our torrents and change the tracker.
# The new tracker is 4 charaters longer than the old one, so it should increase the length of the string
# From 70 to 74.
# PLEASE CHECK YOUR ANNOUNCER STRING IS 70 CHARACTERS LONG BEFORE RUNNING THE NEXT COMMAND
# To check, do a 'head -n1 whatever.torrent" on an old torrent. It should start like this:
# "d8:announce70:http://tracker.preto.me......."
# if after announce, there is a number different than 70, then adjust accordingly
@ctroncoso
ctroncoso / gist:747959
Created December 20, 2010 02:57
WorldMap Quine
v=0000;eval$s=%q~d=%!^Lcf<LK8, _@7gj*LJ=c5nM)Tp1g0%Xv.,S[<>YoP
4ZojjV)O>qIH1/n[|2yE[>:ieC "%.#% :::##" 97N-A&Kj_K_><wS5rtWk@*a+Y5
yH?b[F^e7C/56j|pmRe+:)B "##% ::##########" O98(Zh)'Iof*nm.,$C5Nyt=
PPu01Avw^<IiQ=5$'D-y? "##: ###############" g6`YT+qLw9k^ch|K'),tc
6ygIL8xI#LNz3v}T=4W "# #. .####:#######" lL27FZ0ij)7TQCI)P7u
}RT5-iJbbG5P-DHB<. " ##### # :############" R,YvZ_rnv6ky-G+4U'
$*are@b4U351Q-ug5 " #######################" 00x8RR%`Om7VDp4M5
PFixrPvl&<p[]1IJ " ############:#### %#####" EGgDt8Lm#;bc4zS^
y]0`_PstfUxOC(q " .#############:##% .## ." /,}.YOIFj(k&q_V
zcaAi?]^lCVYp!; " %% .################. #. " ;s="v=%04o;ev"%