Skip to content

Instantly share code, notes, and snippets.

View xalakox's full-sized avatar
🗺️
Working from anywhere

Salvador Aceves Osuna xalakox

🗺️
Working from anywhere
View GitHub Profile
@xalakox
xalakox / gist:2239799
Created March 29, 2012 16:52
Mapa Embedeable de Dirlocal
<iframe style="height: 550px; width: 980px;clear:both" src="http://www.directoriolocal.com/dl/mapa.asp?embeded=true" frameborder="0" width="320" height="240"></iframe>
@xalakox
xalakox / gist:4658929
Last active December 11, 2015 20:59
Lista de Empresas de SMM y Clientes, para añadir a la lista solo visiten : http://bit.ly/Vsh9TY.
PubliHerz
+ El Cantón Toluqueño : https://www.facebook.com/pages/El-canton-toluque%C3%B1o/311674698928180?fref=ts
F:210 I:17 P:8%
Leyenda
------------
F: Followers
I: Usuarios que Interacturaon en la semana mas reciente
P: Porcentaje de Interacción
#!/bin/sh
awk -F',' '/EXTINF/ {canal=$NF; gsub(/ /,"_",canal); getline url; print canal;print "shoot.sh " canal " " url}' canales.m3u
@xalakox
xalakox / 0_reuse_code.js
Created March 31, 2016 20:36
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

Swagger

Dockerfile

FROM node:4
RUN apt-get -y update && npm install -g coffee-script && npm install -g forever && npm install -g nodemon && npm install swagger -g

WORKDIR /app
# ADD package.json /app/
# ADD config.json /app/
# RUN npm install
@xalakox
xalakox / knight_chessboard.js
Last active January 28, 2017 16:53
Kight Problem: ¿ How many moves to reach a destination using the knight on a infinite sized chessboard ?
#!/usr/bin/env node
function solution(A, B) {
moves = [[2,1],[2,-1],[-2,1],[-2,-1],[-1,+2],[+1,+2],[-1,-2],[+1,-2]]
maxmoves = ~~(A*B/4) || 3
finaldestinations = []
trymove = function(startx,starty,priormoves){
priormoves++;
possiblemoves = moves.filter(function(move){
return startx + move[0] > -1 && starty + move[1] > -1
});
@xalakox
xalakox / esnextbin.md
Last active April 24, 2017 23:15
esnextbin sketch
@xalakox
xalakox / esnextbin.md
Last active May 10, 2017 15:28
esnextbin sketch
@xalakox
xalakox / gist:d27622e1907c45f77b24849862afd90f
Created March 7, 2018 17:32
promise time debug function
const timePromise = (fn, fnName) => {
console.time(fnName)
return eval(fn).then((retval)=>{
console.timeEnd(fnName)
return retval
})
}
### Keybase proof
I hereby claim:
* I am xalakox on github.
* I am xalakox (https://keybase.io/xalakox) on keybase.
* I have a public key ASCRbSiHwJ6Mr6gHbg7Pji1a6AEn6ZcI4raErwtL7leFlAo
To claim this, I am signing this object: