Skip to content

Instantly share code, notes, and snippets.

patovala patovala

Block or report user

Report or block patovala

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bastman
bastman / docker-cleanup-resources.md
Created Mar 31, 2016
docker cleanup guide: containers, images, volumes, networks
View docker-cleanup-resources.md

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
@zubietaroberto
zubietaroberto / main.go
Created Oct 22, 2014
Golang UDP Socket Server
View main.go
/*
This script creates a simple UDP Server that exports all data received
through the 8080 socket into the console.
Made By: Roberto E. Zubieta
Panama City, Panamá
G+: https://plus.google.com/u/0/105524772414753584405/
*/
package main
@karmi
karmi / .gitignore
Last active May 28, 2019
Example Nginx configurations for Elasticsearch (https://www.elastic.co/blog/playing-http-tricks-nginx)
View .gitignore
nginx/
!nginx/.gitkeep
!nginx/logs/.gitkeep
src/
tmp/
@mikaelbr
mikaelbr / destructuring.js
Last active Jul 15, 2019
Complete collection of JavaScript destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
View destructuring.js
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];
@gdamjan
gdamjan / README.md
Last active Jun 21, 2019
Setup for an easy to use, simple reverse http tunnels with nginx and ssh. It's that simple there's no authentication at all. The end result, a single ssh command invocation gives you a public url for your web app hosted on your laptop.
View README.md

What

A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.

Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).

Requirements

@afair
afair / bash.cheat
Created Aug 27, 2012
Bash Scripting Quick Reference
View bash.cheat
==========================================
BASH SCRIPTING ==========================================
========================================== TEST COMMAND
==========================================
Invoke: bash [options] file
Shebang: #!/usr/bin/env bash Test: test expression
In script: [ expression ]
========================================== Alternate: [[ espression ]]
LOOP Does not split string words
========================================== Does not expand pathglobs*
You can’t perform that action at this time.