Skip to content

Instantly share code, notes, and snippets.

View JuanjoSalvador's full-sized avatar
🏠
Working from home

Juanjo Salvador JuanjoSalvador

🏠
Working from home
View GitHub Profile
@JuanjoSalvador
JuanjoSalvador / cbhs.py
Created August 22, 2017 21:45
Another XKCD's password generator
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import random
words = []
passw = []
with open("words.txt", "r") as f:
for l in f:
@JuanjoSalvador
JuanjoSalvador / debian-shell.sh
Last active August 15, 2017 09:49
Debian shell alias
# Place the content of this script at the bottom of your ~/.bashrc file (or ~/.zshrc if you are using ZSH).
# Please be ensure that your shell doesn't have any alias or plugin with the following names: ai, ar, au, af
# Replace 'apt' with 'aptitude' if you want to use it instead,
$PMG="apt"
update() {
sudo $PMG update
}
@JuanjoSalvador
JuanjoSalvador / chuckfacts.py
Last active August 25, 2017 11:34
Chuck Norris facts in Python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import random
line = round(random.random() * 100 - 2)
facts = []
with open("quotes.txt", "r") as f:
@JuanjoSalvador
JuanjoSalvador / auto-happynewyear.sh
Last active January 1, 2017 14:57
Send an auto "Happy New Year" message with Telegram.
#!/bin/bash
############################################
# Author: Juanjo Salvador Piedra
# Website: http://juanjosalvador.es
# GitHub: https://github.com/JuanjoSalvador
# Twitter: @Linuxneitor
# Telegram: @JuanjoSalvador
############################################
@JuanjoSalvador
JuanjoSalvador / floodogram.sh
Created December 30, 2016 18:52
Flood a Telegram's chat
# Author: Juanjo Salvador
# Website: http://juanjosalvador.es
# How to execute:
# $ floodogram.sh <@user> <message>
#!/bin/bash
while [ 1 = 1 ];
do
bin/telegram-cli -W -e "msg $1 $2" >> /dev/null
@JuanjoSalvador
JuanjoSalvador / .conkyrc
Last active July 28, 2020 18:02
My conky configuration
# Utils conky config
# By Juanjo Salvador (http://juanjosalvador.es)
background no
use_xft yes
xftfont Sans:size=8
xftalpha 1
update_interval 1
total_run_times 0
own_window yes
@JuanjoSalvador
JuanjoSalvador / quiniela.rb
Last active September 7, 2018 20:00
Generador de quinielas al azar. Ejemplo en Codepad http://codepad.org/FFdI8XyL
#!/usr/bin/env ruby
resultados = ["1", "x", "2"];
30.times do |i|
i = i + 1
if (i < 10)
i = "0" + i.to_s
end
puts "Resultado " + i.to_s + ": " + resultados[rand(3)].to_s
end
@JuanjoSalvador
JuanjoSalvador / csv2json.js
Created May 25, 2016 16:06
Convertidor de CSV a JSON
//var csv is the CSV file with headers
function csvJSON(csv){
var lines=csv.split("\n");
var result = [];
var headers=lines[0].split(",");
for(var i = 1; i < lines.length; i++) {
var obj = {};
var currentline = lines[i].split(",");
@JuanjoSalvador
JuanjoSalvador / README.md
Last active June 8, 2016 11:07
Simple portfolio written in AngularJS that you can use with Jekyll (GitHub Pages)

README

  1. Copy portfolio.html into _includes folder.
  2. Go to your portfolio page and add {% include portfolio.html %} where you want to show it.
  3. Edit projectList into portfolio.html to show your projects.
@JuanjoSalvador
JuanjoSalvador / Trackma Desktop.md
Last active February 15, 2021 14:27
Trackma's Desktop Entry. Open up Trackma as another desktop app.

GNOME Shell

Tested on 3.18.1

  1. Copy trackma.desktop into ~/.local/share/applications/ folder. For all users, put it into /usr/share/applicacions/.
  2. Download icon (available here) and copy it into ~/.local/share/icons/hicolor/128x128/apps/ folder. For all users, change ~/.local/ by /usr/.
  3. Reload gnome-shell by restarting your system.

Trackma Desktop