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 / 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