Skip to content

Instantly share code, notes, and snippets.

View LuisValdesZero's full-sized avatar
🎯
Focusing

Luis Valdés LuisValdesZero

🎯
Focusing
View GitHub Profile
@LuisValdesZero
LuisValdesZero / index.html
Last active February 1, 2017 12:29
Itaipu Dam Organization diagram example
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title></title>
<!-- stylesheets -->
<link rel="stylesheet" href="https://rawgit.com/lvlds/treant-js/master/Treant.css" type="text/css"/>
</head>
@LuisValdesZero
LuisValdesZero / index.html
Last active February 1, 2017 12:26
Basic Treant-js example
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title></title>
<!-- stylesheets -->
<link rel="stylesheet" href="https://rawgit.com/lvlds/treant-js/master/Treant.css" type="text/css"/>
</head>
@LuisValdesZero
LuisValdesZero / latinoware2016.js
Created October 20, 2016 18:04
Docker + Jenkins + NodeJS + DigitalOcean
let shine = () => {
let table = jQuery(`table[id^="table"]`);
let filters = jQuery(`#ctl0_ctl1 > div.content-viewprogram.content > fieldset > div > label:nth-child(1) > span`);
const td = jQuery(`table tbody tr:nth-child(1) td:nth-child(9)`);
const cellContent = td.find("div.CellContent");
td.css("background-color"," black");
cellContent.css("background-color"," black");
cellContent.css("font-size", "18px");
table.css("width", "60%");
@LuisValdesZero
LuisValdesZero / workflow-properties.groovy
Created April 4, 2016 18:05
JIRA Workflow Properties using ScriptRunner plugin
/*
Autor: Luis Valdes
Fecha: 27/01/2016
*/
import com.atlassian.jira.workflow.WorkflowManager
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.ApplicationUser
workflowManager = ComponentAccessor.getWorkflowManager()
@LuisValdesZero
LuisValdesZero / npm_workspace_clean.sh
Created February 28, 2016 19:07
Add to cat npm_workspace_clean.sh >> ~/.bashrc.
function ds_tree {
for dir in $(find . -maxdepth 1 -type d )
do
du -sh $dir;
done
}
function npm_workspace_clean_recursive {
find . -maxdepth 2 -name "node_modules" -exec rm -rf {} \;
}
ratings = [[3,4], [3,3,3,4], [4]]
def ratingThreshold(threshold, ratings):
avgF = lambda x: [ sum([ e for e in x[0] ]) / float(len(x[0])), x[1] ]
average = map(avgF, zip(ratings, range( len(ratings) ) ) )
return [i[1] for i in average if i[0] < threshold]
print(ratingThreshold(3.5, ratings))

Keybase proof

I hereby claim:

  • I am lvlds on github.
  • I am lvlds (https://keybase.io/lvlds) on keybase.
  • I have a public key whose fingerprint is 8B84 AD78 BD6C 0EB1 F36A D72B 611A 8C55 035C 0668

To claim this, I am signing this object:

@LuisValdesZero
LuisValdesZero / recursion.js
Created September 10, 2015 12:48
A recursive task to update DOM elements that are loaded dynamically.
// how many seconds does the interval have 'time' seconds
var time = 5;
// The recursive call will be made every 'timeout' milliseconds
var timeout = 500;
// this task will be executed in every call to 'recursive'
var task = function(level){
console.log("Hello world, level is " + level);
};