Skip to content

Instantly share code, notes, and snippets.

View bluebycode's full-sized avatar
👋

Álvaro López bluebycode

👋
View GitHub Profile
cd poc
npm init react-app bler
cd bler
npm start
en App.js
import { Encrypt } from "./Crypto"
añade junto a App.js => Crypto.js (https://gist.github.com/vrandkode/c53492f975ee926ad0cc58055ed0faf3)
en App() añade
import { secretbox, box, randomBytes } from "tweetnacl";
import {
decodeUTF8,
encodeUTF8,
encodeBase64,
decodeBase64
} from "tweetnacl-util";
const fixedNonce = () => new Uint8Array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])//randomBytes(secretbox.nonceLength);
const newNonce = () => randomBytes(secretbox.nonceLength);
@bluebycode
bluebycode / dom.js
Last active September 6, 2019 13:24
dom.js
console.log("bingo1")
(function(dom){
console.log("bingo2", dom);
})(window.document);
#! /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
# ./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
conda create -n test_r -c r r-essentials jupyter
source activate test_r
jupyter notebook
queda pepe tapeo:
yo curro
yo trabajo
hamburguesa pollitos:
asesino
asesinos
cara:
para cara la de Juan Real
@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
#! /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 / 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 {