- jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
- Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
- AngularJS - Conventions based MVC framework for HTML5 apps.
- Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
- lawnchair - Key/value store adapter for indexdb, localStorage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Thing { | |
constructor(name) { | |
this.name = name; | |
this.__lookupGetter__ = (n) => this[n]; | |
this.is_a = new Proxy(this, { | |
get: (target, name) => { | |
if (typeof n === 'symbol') { | |
return target[n]; | |
} | |
const propName = `is_a_${name}`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Paste this code in https://www.linkedin.com/mynetwork/invite-connect/connections/ | |
// and save 2 clicks when trying to delete a connection | |
let deleteFriend = () => { | |
$('.mn-connection-card__dropdown-option-text').click(); | |
setTimeout($('button[data-control-name=confirm_removed]').click(), 500); | |
}; | |
let handlePointsClick = () => { | |
setTimeout(deleteFriend , 200); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Tu Nombre | |
email = Tu Correo | |
[color] | |
branch = auto | |
diff = auto | |
status = auto | |
ui = true | |
interactive = auto | |
[help] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let highest = []; | |
longest = (sequence) => { | |
var ordered = sequence.map(n => n); | |
ordered.sort((a, b) => a - b); | |
var matrix = {}; | |
const length = ordered.length; | |
for (let i = 0; i < length; i++) { | |
for(let j = 0; j < length; j++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
import source from 'vinyl-source-stream'; | |
import gulp from 'gulp'; | |
import browserify from 'browserify'; | |
import babelify from 'babelify'; | |
import run from 'run-sequence'; | |
import rimraf from 'rimraf'; | |
import shell from 'gulp-shell'; | |
import server from 'gulp-live-server'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"presets": ["es2015", "stage-0"] | |
} | |
//This will allow you to use ES6 in the gulpfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = []; | |
var playlist = React.createClass({ | |
getInitialState: function(){ | |
return { lastSong: 0 } | |
}, | |
componentDidMount: function() { | |
setInterval(this.loadSongs, 5000); | |
}, | |
loadSongs: function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parseCSV(input, separator, quote) { | |
separator = separator || ','; | |
quote = quote || '"'; | |
var tempWord ='', c ='', temp = [], | |
closingPosition, result =[], specialCharacters = '$\\', | |
doubleQuoteRegex = new RegExp(quote+quote, 'g'); | |
if (specialCharacters.indexOf(quote) > -1) { | |
doubleQuoteRegex = new RegExp('\\' +quote+ '\\' +quote, 'g'); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var allSquaredPairs = function(n){ | |
var max = Math.sqrt(n), | |
posibles = [], | |
temp =0, | |
result = [], | |
i =0; | |
for(; i<=max; i++) | |
{ | |
//Reference http://stackoverflow.com/questions/5380323/whats-the-fastest-algorithm-to-represent-a-prime-as-sum-of-two-squares | |
temp = Math.sqrt(n-i*i); |
NewerOlder