Skip to content

Instantly share code, notes, and snippets.

View MeLlamoPablo's full-sized avatar

Pablo Caballero MeLlamoPablo

  • Framer
  • Sevilla, España
  • 17:34 (UTC +01:00)
  • X @pabcrab
View GitHub Profile
@MeLlamoPablo
MeLlamoPablo / id_ed25519.pub
Created March 29, 2020 13:08
My SSH public keys
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILyTVAyGhPiQ8c0AxLAJUyIwCuFPhfAN3sFmVi6gIl7t pablo@pablo-Sobremesa
@MeLlamoPablo
MeLlamoPablo / keybase.md
Created July 10, 2018 06:13
keybase.md

Keybase proof

I hereby claim:

  • I am MeLlamoPablo on github.
  • I am mellamopablo (https://keybase.io/mellamopablo) on keybase.
  • I have a public key whose fingerprint is 93C1 AE6A A35C 5B38 8955 9846 12BF 2F12 483F D814

To claim this, I am signing this object:

#!/usr/bin/env bash
current_temperature=$(gsettings get \
org.gnome.settings-daemon.plugins.color \
night-light-temperature \
| sed 's/uint32 //g')
if [[ $1 = "up" ]]; then
new_temperature=$(($current_temperature + 100))
else
@MeLlamoPablo
MeLlamoPablo / aws_ses_iam_to_smpt_password.js
Created February 13, 2018 08:39
Node.js snippet that converts an AWS IAM secret access key to an AWS SES SMTP password
/*
* Implementation of the algorithm described here:
* https://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html
*/
const {createHmac} = require("crypto");
const key = process.env.KEY || (() => { throw new Error("Variable KEY not defined")} )();
const msg = "SendRawEmail";
const version = new Buffer(1);
@MeLlamoPablo
MeLlamoPablo / redis-url-to-cmd
Created August 12, 2017 15:12
Converts a redis url to the corresponding redis-cli command
#!/usr/bin/env node
/*
* Converts a redis url to the corresponding redis-cli command
*/
const rl = require("readline").createInterface({
input: process.stdin,
output: process.stdout,
terminal: false
@MeLlamoPablo
MeLlamoPablo / nvmlink
Created February 1, 2017 11:34
Creates a symlink to /usr/bin/node after using nvm
@MeLlamoPablo
MeLlamoPablo / .zshrc
Last active September 15, 2017 17:52
My custom dotfiles
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/home/pablo/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="powerlevel9k/powerlevel9k"
@MeLlamoPablo
MeLlamoPablo / 3DJ-getMentions.js
Last active July 2, 2016 22:40
Esta funcíón devuelve una promesa (Promise) con todas las menciones del usuario en 3DJuegos.
/*
Esta funcíón devuelve una promesa (Promise) con todas las menciones del usuario en 3DJuegos.
EJEMPLO DE USO:
//Cuando se ejecuta getMentions() la promesa todavía no se ha completado.
var promesa = getMentions();
//Usamos promesa.then() para ejecutar la acción que queremos una vez se haya completado
promesa.then(function(menciones){
// ==UserScript==
// @name TRUJ-Userscript
// @namespace http://reddit.com
// @version 0.1
// @description This is a port of the chrome extension TRUJ to UserScript.
// The author of said extension is kmc and its download link can be found here:
// https://chrome.google.com/webstore/detail/true-unexpected-jihad/ihglffdfnfdifnlgjecjbnpkjffciibm
// I, (MeLLamoPablo a.k.a. /u/sfcpfc), am not responsible for any trouble that this UserScript may cause.
// Contact the original author instead.
// @author MeLLamoPablo a.k.a. /u/sfcpfc
@MeLlamoPablo
MeLlamoPablo / dotaHeroes.lua
Created July 15, 2015 16:02
This table contains every released dota hero + Abyssal Underlord to day 15/07/2015. It is useful for outputting a hero name to the game, because the Scripting API will return "ugly" names beginning in npc_dota_hero
-- dotaHeroes.lua by Pablo Rodríguez (http://steamcommunity.com/id/MeLlamoPablo)
-- No license. Use it on your script. Modify it. Convert it on a nuclear weapon. Whatever.
-- This table contains every released dota hero + Abyssal Underlord to day 15/07/2015.
-- It is useful for outputting a hero name to the game, because the Scripting API will
-- return "ugly" names beginning in npc_dota_hero
dotaHeroes = {npc_dota_hero_abaddon = "Abaddon",
npc_dota_hero_abyssal_underlord = "Abyssal Underlord",
npc_dota_hero_alchemist = "Alchemist",