Skip to content

Instantly share code, notes, and snippets.

View JuanjoSalvador's full-sized avatar
🎯
Focusing

Juanjo Salvador JuanjoSalvador

🎯
Focusing
View GitHub Profile
@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 / 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 / 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 / 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 / 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 / http.js
Created September 20, 2017 15:27
Example of $http usage in Angular 1.6
angular.module('ExampleModule', [])
.service('ExampleService', function($http) {
var base_url = "http://mywebservice.com/";
return {
this.get = function() {
return $http.get(base_url + "users");
}
}
});
const fs = require('fs')
const iconv = require('iconv-lite');
function parse(path) {
let dir = fs.readdirSync(path)
dir.map(function(item) {
let uri = iconv.encode(path + "/" + item, 'utf-8')
@JuanjoSalvador
JuanjoSalvador / apksigner
Created November 2, 2017 17:03
APK signer for Android development
#!/bin/bash
# Fill the empty vars and place it on /usr/local/bin/
# Run it by:
# $ apksigner <apk file>
PACKAGE=$1
KEYSTORE=<YOUR KEYSTORE FILE HERE>
ALIAS=<YOUR KEY ALIAS HERE>
@JuanjoSalvador
JuanjoSalvador / downloader.py
Last active June 11, 2024 06:58
Extracts and decrypt a list of adf.ly links from a forum's post
# -*- coding: utf-8 -*-
import base64, requests, os, re, sys
from bs4 import BeautifulSoup
def _crack(code):
zeros = ''
ones = ''
for n,letter in enumerate(code):
@JuanjoSalvador
JuanjoSalvador / hlab-almeria-post-template
Created March 18, 2018 19:09
Hacklab Almería Post template
---
layout: post-jsonld
#Datos del Evento
title: ""
description: ""
#Fecha
startDate: YYYY-MM-DDYHH:00
endDate: YYYY-MM-DDYHH:00
#Lugar
place: ""