Skip to content

Instantly share code, notes, and snippets.

View hansfpc's full-sized avatar
🌓
There ain't no such thing as a free lunch.

Hans Piña hansfpc

🌓
There ain't no such thing as a free lunch.
View GitHub Profile
@hansfpc
hansfpc / docker_commands.sh
Last active April 2, 2019 08:15 — forked from santi020k/docker_commands.sh
Comandos básicos de Docker (spanish)
# Notas
containerID # suficiente con los primeros 3 dijitos del id
-it # Modo iterativo
# Comprobar funcionamiento docker
docker -v
# o
docker version
@hansfpc
hansfpc / facebook_warning.html
Created July 29, 2018 17:24 — forked from tosbourn/facebook_warning.html
How to recreate Facebook's console warning
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script type="text/javascript">
const warningTitleCSS = 'color:red; font-size:60px; font-weight: bold; -webkit-text-stroke: 1px black;';
const warningDescCSS = 'font-size: 18px;';
@hansfpc
hansfpc / semicolons.js
Created June 13, 2018 18:36
What you need to keep not using semicolons in JS.
There are three simple (and similar) rules to remember:
* Don't start a new line with parentheses,
* don't start a new line with a bracket,
* don't start a new line with a backtick.
And that's it.
@hansfpc
hansfpc / callbacks.js
Created August 4, 2017 05:50
Callback example for dummies
let getUser = (id, callback) => {
let user = { id, name: 'hans'};
setTimeout( () => callback(user), 3000);
};
getUser(31, (userObject) => console.log(userObject) );
// Prints { id: 31, name: 'hans' }