Skip to content

Instantly share code, notes, and snippets.

View danielnieto's full-sized avatar
🍔
coding

Daniel Nieto danielnieto

🍔
coding
  • Crunchtime
  • Tochpan, Jalisco, Mexico
View GitHub Profile
@danielnieto
danielnieto / flourine-perf.js
Created February 10, 2020 23:25
a hacked flourine version to report execution times
require('colors')
Class('Flow').includes(CustomEventSupport, NodeSupport)({
prototype: {
/**
holder for the name of the flow
@property name <public> [String]
**/
name: '',
function foo(){
return Promise.resolve('resuelta')
}
for (var i=0; i<10; i++) {
(function(){
var index = i;
foo().then(function(){
console.log(index)
@danielnieto
danielnieto / cloudSettings
Last active March 17, 2020 23:06
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-03-09T21:38:36.518Z","extensionVersion":"v3.4.3"}
@danielnieto
danielnieto / source.json
Created June 13, 2019 19:49
wrong mapping
{
"text": [
{
"allowedFonts": [],
"visible": true,
"contents": "tacos",
"tag": "TEXT1",
"color": "#1c1c1c"
},
{
@danielnieto
danielnieto / .bash_profile
Created May 24, 2019 20:03
paste it at the bottom of your .bash_profile
# CUSTOM PROMPT http://ezprompt.net/
# get current branch in git repo
function parse_git_branch() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
STAT=`parse_git_dirty`
echo "[${BRANCH}${STAT}]"
else
@danielnieto
danielnieto / pm2.sh
Created February 15, 2019 05:57 — forked from GManzato/pm2.sh
Run PM2 on a Synology , file need to be create in `/usr/local/etc/rc.d`
#!/bin/sh
: ${pm2_user="root"}
command="/usr/local/lib/node_modules/pm2/bin/pm2"
pidfile="/home/${pm2_user}/.pm2/${name}.pid"
super() {
@danielnieto
danielnieto / ejercicio1.rb
Created January 26, 2013 12:29
Ejercicios bootcamp Crowd
#Autor: Daniel Nieto
preguntas = ["como te llamas?", "cual es tu edad?", "estudias o trabajas", "eres hombre o mujer?" , "iOS o Android?", "Pepsi o Coca Cola?", "donde vives?", "sabes programar con Ruby?", "fumas?", "bebes alcohol?"]
respuesta = nil
until respuesta.eql? "bye"
puts preguntas.sample
respuesta = gets.chomp.downcase