Skip to content

Instantly share code, notes, and snippets.

View bluebycode's full-sized avatar
👋

Álvaro López bluebycode

👋
View GitHub Profile
@bluebycode
bluebycode / port_redirection_iptables
Last active October 5, 2020 09:50
Port forwarding from 443 to 22 using iptables #iptables #forward #redirection
iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 22
@bluebycode
bluebycode / git_undo_remote_commit
Created May 3, 2016 16:47
Git Undo remote commit #git #revert #commit
#commit a739014b596c8feff37426cb8ff22d72aad86bcb
# Author: vrandkode <vrandkode@gmail.com>
# adding base domain trace. last commit
#commit de12d72f1edeb3fca500e3aab2e884a2a48ffd05
# Author: vrandkode <vrandkode@gmail.com>
# working commit
# git push <remote> +<commit-id>^:<branch>
# revert to commit's parent: de12d72f
@bluebycode
bluebycode / nginx.conf
Created May 25, 2016 12:35
Nginx basic configuration. Basic authentication layout #nginx #htpasswd
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
#! /usr/bin/env python
import sys
import subprocess
if len(sys.argv) == 1:
tail = subprocess.Popen('tail -1000 GSGame.log'.split(), stdout=subprocess.PIPE)
rooms = subprocess.Popen('grep Rooms'.split(),stdin=tail.stdout, stdout=subprocess.PIPE)
last = subprocess.Popen('tail -1'.split(),stdin=rooms.stdout, stdout=subprocess.PIPE)
output = last.communicate()[0]
parameters = output.rstrip().split()
@bluebycode
bluebycode / SSH (Linux o Mac ) Bajo un proxy
Created October 16, 2017 20:30
Acceder por SSH (Linux o Mac ) bajo un proxy
# Corkscrew (https://github.com/elia/corkscrew) es una herramienta que permite redirigir mediante un tunel
# las conexiones por SSH (OpenSSH) a traves de un proxy HTTP:
# Bajar una compilación hecha (o compilar desde la ubicación de github del proyecto) y guardar
# en local como /usr/local/bin/corkscrew
$ wget https://github.com/vrandkode/lzfport/blob/master/corkscrew
$ chmod a+x corkscrew
$ sudo cp corkscrew /usr/local/bin/corkscrew
queda pepe tapeo:
yo curro
yo trabajo
hamburguesa pollitos:
asesino
asesinos
cara:
para cara la de Juan Real
conda create -n test_r -c r r-essentials jupyter
source activate test_r
jupyter notebook
# ./bench <app> N At t threads compilebeforerun?
# ./bench app-p 1000 100 1 64 true
app=${1}
N=${2}
At=${3:-"100"}
t=${4:-"1"}
threads=${5:-"64"}
compile=${6:-"true"}
if [ "$compile" = "true" ]; then
#! /usr/bin/python
# by pts@fazekas.hu at Tue Oct 11 13:12:47 CEST 2016
""":" #megapubdl: Download public files from MEGA (mega.nz).
type python2.7 >/dev/null 2>&1 && exec python2.7 -- "$0" ${1+"$@"}
type python2.6 >/dev/null 2>&1 && exec python2.6 -- "$0" ${1+"$@"}
type python2.5 >/dev/null 2>&1 && exec python2.5 -- "$0" ${1+"$@"}
type python2.4 >/dev/null 2>&1 && exec python2.4 -- "$0" ${1+"$@"}
exec python -- ${1+"$@"}; exit 1
@bluebycode
bluebycode / dom.js
Last active September 6, 2019 13:24
dom.js
console.log("bingo1")
(function(dom){
console.log("bingo2", dom);
})(window.document);