Skip to content

Instantly share code, notes, and snippets.

View j0an's full-sized avatar

Juan Manuel Garcia Olivares j0an

View GitHub Profile
@j0an
j0an / docker-cleanup-resources.md
Created March 19, 2018 15:50 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@j0an
j0an / osx-for-hackers.sh
Last active August 29, 2015 14:27 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@j0an
j0an / nginx_laravel
Last active August 29, 2015 14:22 — forked from Ilyes512/nginx_laravel
server {
listen 80;
server_name domain.com *.domain.com;
root /home/domain.com/public;
index index.php
access_log /var/log/nginx/domain.com/access.log;
error_log /var/log/nginx/domain.com/error.log;
@j0an
j0an / gist:8db5cce32d9af6dd6504
Created October 15, 2014 15:23
Protect against SSLv3 vulnerability #poddle
edit /etc/nginx/config.conf
add this line inside http
http {
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
...
}
sudo service restart nginx.
Demasiado temprano como hoy, 3 días,
quiero reencarnar en los museos mas conocidos
sin tus decisiones
Pregunté por costumbre. ¿Y para qué el camino?
Debería practicarlo con mas cariño para cuando toque
con algún rasguño innecesario.
Un día como hoy esperar que da,
para salvar al trabajo por dos años, o más.
@j0an
j0an / cors-nginx.conf
Last active August 29, 2015 14:02 — forked from alexjs/cors-nginx.conf
cors
location / {
if ($http_origin ~* (whitelist\.address\.one|whitelist\.address\.two)) {
set $cors "true";
}
if ($request_method = 'OPTIONS') {
set $cors "${cors}options";
}
if ($request_method = 'GET') {
@j0an
j0an / .gitignore
Last active August 29, 2015 14:01 — forked from redoPop/.gitignore
/*
!.gitignore
!wp-content/
wp-content/*
!wp-content/plugins/
!wp-content/themes/
wp-content/plugins/*
!wp-content/plugins/akismet
wp-content/themes/*
!wp-content/themes/my-theme/
@j0an
j0an / 0_reuse_code.js
Created May 26, 2014 14:39
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@j0an
j0an / gist:7705380
Created November 29, 2013 12:59
Spanish Stop Words
un, una, unas, unos, uno, sobre, todo, también, tras, otro, algún, alguno, alguna, algunos, algunas, ser, es, soy, eres, somos, sois, estoy, esta, estamos, estais, estan, como, en, para, atras, porque, por qué, estado, estaba, ante, antes, siendo, ambos, pero, por, poder, puede, puedo, podemos, podeis, pueden, fui, fue, fuimos, fueron, hacer, hago, hace, hacemos, haceis, hacen, cada, fin, incluso, primero desde, conseguir, consigo, consigue, consigues, conseguimos, consiguen, ir, voy, va, vamos, vais, van, vaya, gueno, ha, tener, tengo, tiene, tenemos, teneis, tienen, el, la, lo, las, los, su, aqui, mio, tuyo, ellos, ellas, nos, nosotros, vosotros, vosotras, si, dentro, solo, solamente, saber, sabes, sabe, sabemos, sabeis, saben, ultimo, largo, bastante, haces, muchos, aquellos, aquellas, sus, entonces, tiempo, verdad, verdadero, verdadera cierto, ciertos, cierta, ciertas, intentar, intento, intenta, intentas, intentamos, intentais, intentan, dos, bajo, arriba, encima, usar, uso, usas, usa, usamos, usais, usa