Skip to content

Instantly share code, notes, and snippets.

View Madh93's full-sized avatar
🏠
Work from home

Miguel Hernández Madh93

🏠
Work from home
View GitHub Profile
@Madh93
Madh93 / xfcemon.sh
Created March 21, 2016 15:14
Launch XFCE/Cinnamon apps
#! /bin/bash
# NAME : xfcemon.sh
# DESCRIPTION : Launch XFCE/Cinnamon apps
# AUTHOR : Madh93 (Miguel Hernandez)
# VERSION : 0.0.1
# LICENSE : GNU General Public License v3
# USAGE : bash xfcemon.sh
@Madh93
Madh93 / gmailer.rb
Last active April 16, 2016 19:45
Check and notify new gmails
#! /usr/bin/env ruby
# NAME : gmailer.rb
# DESCRIPTION : Check and notify new gmails
# AUTHOR : Madh93 (Miguel Hernandez)
# VERSION : 0.0.1
# LICENSE : GNU General Public License v3
# USAGE : ruby gmailer.rb XML [OPTION]
require 'nokogiri'
// ==UserScript==
// @name dpCat - Crear
// @namespace dpcat
// @description Crear nueva produccion
// @include http://127.0.0.1:8000/postproduccion/crear/
// @require https://code.jquery.com/jquery-2.2.3.min.js
// @version 1
// @grant none
// ==/UserScript==
@Madh93
Madh93 / yt-dl.sh
Last active November 28, 2016 22:07
Get 1080p Youtube videos (or best available quality)
#! /bin/bash
# Requirements: youtube-dl (https://github.com/rg3/youtube-dl/)
if [ -n "$(youtube-dl --version)" ]; then
format=`youtube-dl -F "$1"`
if [ -n "$(echo "$format" | cut -d " " -f1 | grep 299)" ]; then
youtube-dl -f 299+140 "$1"
elif [ -n "$(echo "$format" | cut -d " " -f1 | grep 298)" ]; then
youtube-dl -f 298+140 "$1"
@Madh93
Madh93 / md5test.js
Created June 10, 2016 21:23
MD5 Test
var crypto = require('crypto');
start_time = new Date();
var c = 0;
var m = 10000000;
while (c < m) {
var n0 = Math.floor(Math.random() * 9999999999);
var n1 = Math.floor(Math.random() * 9999999999);
var nn = crypto.createHash('md5').update(n0.toString()+n1.toString()).digest("hex");
@Madh93
Madh93 / VolafileDownloader.md
Last active April 9, 2021 07:07
Volafile Downloader

Volafile Downloader

Get all files from volafile rooms.

Requirements

  • Ruby
  • Selenium
How to install Selenium?
@Madh93
Madh93 / http_test.rb
Created June 14, 2016 16:58
Http Test: Download a binary file
#! /usr/bin/env ruby
# NAME : Http Test
# DESCRIPTION : Download a binary file over HTTP
# AUTHOR : Madh93 (Miguel Hernandez)
# VERSION : 0.0.1
# LICENSE : GNU General Public License v3
# USAGE : ruby http_test.rb
require 'open-uri'
@Madh93
Madh93 / SyncSubs.md
Last active August 1, 2016 15:59
Sync Subtitles

Sync Subs

Synchronize .srt subtitles

Requirements

  • Ruby
Usage

Usage: ruby syncsubs.rb [options]

@Madh93
Madh93 / nvidia-fanspeed.sh
Last active August 16, 2017 17:52
Check temperature and set fan speed value of Nvidia card
#! /bin/bash
#
# nvidia-fanspeed
#
# `nvidia-fanspeed` check temperature and set fan speed value
#
# Requirements: nvidia-xconfig --cool-bits=4
##############################
# Custom configuration:
@Madh93
Madh93 / yt-to-mp3.md
Last active December 16, 2016 07:23
Search and download MP3 from YouTube

yt-to-mp3.rb

Search and download MP3 from YouTube

Requirements

  • Google API Key
  • Ruby (and 'yt' gem)
  • Youtube-dl (and ffmpeg or avconv)
Usage