Skip to content

Instantly share code, notes, and snippets.

View joserobleda's full-sized avatar

Jose Ignacio joserobleda

View GitHub Profile
@joserobleda
joserobleda / step1.js
Last active December 13, 2017 07:58
Usando push notifications - Step 1
Notification.requestPermission().then(() => new Notification('Hola mundo!'))
@joserobleda
joserobleda / index.html
Created June 17, 2017 16:34
Ether Jackpot index.html
<!DOCTYPE html>
<html>
<head>
<title>Ether Jackpot</title>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<script src="./app.js"></script>
</head>
<body>
<h1>Ether Jackpot</h1>
<p>
@joserobleda
joserobleda / parameters.js
Created February 23, 2017 10:56
Webapp local parameters
export default {
devApiUrl: "http://192.168.99.100:8080/app_dev.php/"
}
@joserobleda
joserobleda / A: exercise.md
Last active October 6, 2016 11:05
Finizens exercise: contact communication view

Contact communication view

Lo que valoraremos del ejercicio es:

  • Como te desenvuelves programando: rapidez, estilo, consistencia, etc...
  • La eficacia e idoneidad de la idea
  • La arquitectura del software

Disponemos de un fichero de log alojado en un servidor remoto que contiene las comunicaciones que un determinado

@joserobleda
joserobleda / create_user
Created June 23, 2016 14:57
Create readonly user on MySQL
CREATE USER 'readonly'@'%' IDENTIFIED BY 'password';
GRANT SELECT ON db.* TO 'readonly'@'%';
@joserobleda
joserobleda / resources.txt
Created June 2, 2016 17:06
Load test resources
https://github.com/tsenart/vegeta
https://loadimpact.com/
https://github.com/kahun/awesome-sysadmin
http://tools.kali.org/web-applications/funkload
https://www.qasymphony.com/
@joserobleda
joserobleda / uncache
Last active August 29, 2015 14:24
Remove cache files for php fpm
#!/bin/bash
for file in "$@"
do
echo "uncache $file..."
PHPFPMCLI_FILE="/tmp/php-fpm-cli.$$.php"
rm $file
echo "<?php opcache_invalidate(\"$file\");" > $PHPFPMCLI_FILE
SCRIPT_FILENAME=$PHPFPMCLI_FILE REQUEST_METHOD=GET cgi-fcgi -bind -connect "127.0.0.1:9000"
rm $PHPFPMCLI_FILE
@joserobleda
joserobleda / torrent-watcher.sh
Last active August 29, 2015 14:06
Torrent Watcher
#!/bin/bash
# this file needs fswatch to run
# fswatch /path/to/folder/torrents/ | xargs -n1 ./play.sh
dir=$(dirname $1)
file="${dir}/media.torrent";
pid=$(ps aux | grep webtorrent | grep chromecast | awk '{print $2}')