A Pen by Rubens Mariuzzo on CodePen.
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 shuffle(array) { | |
var currentIndex = array.length, temporaryValue, randomIndex | |
while (0 !== currentIndex) { | |
randomIndex = Math.floor(Math.random() * currentIndex) | |
currentIndex -= 1 | |
temporaryValue = array[currentIndex] | |
array[currentIndex] = array[randomIndex] | |
array[randomIndex] = temporaryValue | |
} |
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 repos = await (await fetch('https://developersdo.github.io/opensource-data/repos.json')).json() | |
console.log(`Repos Total: ${repos.length}`) | |
var specialRepos = repos.filter(repo => { | |
var [login, name] = repo.name.split('/') | |
return login === name | |
}) | |
console.log(`Special Repos Total: ${specialRepos.length}`) |
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
#!/bin/bash | |
git checkout master | |
git pull origin master | |
git branch | grep -v "master\|develop" | xargs git branch -D |
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
// DO NOT COMMIT | |
(() => { | |
const keepAwake = () => { | |
clearTimeout(keepAwake.nod.timeoutId) | |
keepAwake.nod() | |
} | |
keepAwake.nod = () => { | |
keepAwake.nod.timeoutId = setTimeout(() => { | |
location.reload() | |
keepAwake.nod() |
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
mkdir x-script | |
cd x-script | |
npm init |
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
package com.mariuzzo.profiler; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.web.servlet.ModelAndView; | |
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; |
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
{ | |
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme", | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", | |
".hg", | |
"CVS", | |
".sass-cache", | |
"node_modules", |
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
// Proposed solution for an exercise given to a friend: http://pastebin.com/hjFCZYE7 | |
function printList(linePrefix, list) { | |
for (var i = 0; i < list.length; i++) { | |
if (typeof list[i] === 'string') { | |
console.log(linePrefix + '.' + i + ': ' + list[i]); | |
} else { | |
printList(linePrefix + '.' + i, list[i]); | |
} | |
} |
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 deleteme; | |
create table assets ( | |
item_name varchar(32) primary key, | |
dynamic_cols blob | |
); | |
INSERT INTO assets VALUES | |
('MariaDB T-shirt', COLUMN_CREATE('campo_padre', COLUMN_CREATE('hijo', 'valor del hijo'))); |
NewerOlder