Skip to content

Instantly share code, notes, and snippets.

@simon0191
simon0191 / README.md
Last active September 24, 2018 10:23
Docker RUN vs CMD

Docker RUN vs CMD

RUN

  • creates a layer, it actually modifies the image during the build.
  • it's executed during "build time"
  • you can specify multiple RUNs in a Dockerfile

CMD

  • doesn't create a layer
  • specifies the command that will be run by default when the container is run if no command is passed to the docker run instruction
@simon0191
simon0191 / vote.rb
Created October 27, 2016 23:16
¿Cómo hacer que Esperanza Gomez gane los premios Shock?
# https://medium.com/@simon0191/c%C3%B3mo-hacer-que-esperanza-gomez-gane-los-premios-shock-8bb0044ec074
require 'date'
require 'cgi'
require 'curb'
TOKEN_REGEX = /.*'(.*)'.*/
def vote(account_id, poll_id, vote_id, site_url, user_agent)
timestamp = DateTime.now.strftime('%Q')
token_url = "https://polldaddy.com/n/#{account_id}/#{poll_id}?#{timestamp}"

Estamos usando Pins para compartir, guardar y tener una forma fácil de encontrar ofertas de trabajo

Compartiendo ofertas de trabajo

  1. Comparta la oferta de trabajo idealmente incluyendo descripción, habilidades requeridas, habilidades deseadas, salario, si es remota o no y cómo aplicar a la oferta.

Por ejemplo:

Desarrollador Full Stack en Medellín.
@simon0191
simon0191 / index.html
Created November 12, 2015 16:24
Template para taller UPTC
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Super Tienda</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body>
<h1>Hola Mundo</h1>
require 'thread'
require 'pp'
def download_time(url)
`curl --silent -w "%{time_total}" --output /dev/null #{url}`.to_f
end
def compare_download_times(urls,opts={})
tests = opts[:tests] || 1000
concurrency = opts[:concurrency] || 1
@simon0191
simon0191 / index.html
Created April 14, 2015 19:19
Todo List
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Todo List</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="wrapper">
<h1>Todo List</h1>
function main(str) {
var ssT = /[\*\+\-\/]/;
var nsT = /\d/;
var ns = str.split(ssT).filter(function(s) {
return s !== '';
});
var ss = str.split(nsT).filter(function(s) {
return s !== '';
});
@simon0191
simon0191 / primes.js
Last active August 29, 2015 14:10
primes
var isPrime = {};
function main(n) {
for(var i = 0;i<=n;++i) isPrime[i] = true;
isPrime[0] = isPrime[1] = false;
var sol = [];
for(var i = 2;i<=n;++i) {
if(isPrime[i]) {
sol.push(i);
for(var j = i*i;j<=n;j+=i) {
var mapa = {'á':'a','é':'e','í':'i','ó':'o','ú':'u','ñ':'n'};
function main(str) {
var sol = '';
for(var i = 0;i<str.length;++i) {
var curr = str[i].toLowerCase();
curr = (mapa[curr] || curr );
if(isAscii(curr)) {
sol+=curr;
} else {
if(sol[sol.length-1] !== '-')
function main(n) {
var sol = 1;
while(n > 1) sol*=(n--);
return sol;
}
/*
console.log(main(1));
console.log(main(2));
console.log(main(10));
console.log(main(8));