This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("bingo1") | |
(function(dom){ | |
console.log("bingo2", dom); | |
})(window.document); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ./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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conda create -n test_r -c r r-essentials jupyter | |
source activate test_r | |
jupyter notebook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
queda pepe tapeo: | |
yo curro | |
yo trabajo | |
hamburguesa pollitos: | |
asesino | |
asesinos | |
cara: | |
para cara la de Juan Real |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user nginx; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { |
NewerOlder