Skip to content

Instantly share code, notes, and snippets.

View thewarpaint's full-sized avatar
🎄
https://dosmilveinte.mx

Eduardo Garcia thewarpaint

🎄
https://dosmilveinte.mx
View GitHub Profile
@thewarpaint
thewarpaint / i.js
Last active September 4, 2017 09:05
string.replace(/[ÁÉÓÚ]/g, 'Í').replace(/[áéóú]/g, 'í').replace(/[AEOU]/g, 'I').replace(/[aeou]/g, 'i');
string.replace(/[ÁÉÓÚ]/g, 'Í').replace(/[áéóú]/g, 'í').replace(/[AEOU]/g, 'I').replace(/[aeou]/g, 'i');
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
body {
background-color: grey;
}
@thewarpaint
thewarpaint / README.md
Created June 16, 2016 17:12
Git aliases
git config --global alias.rm-br '!git branch --merged master | grep -v '^\*\|  master' | xargs -n 1 git branch -d'
@thewarpaint
thewarpaint / twitter.js
Last active June 17, 2016 05:21
Anonymizr
var Anonymizr = {
people: [
{ name: "Abradolf Linkler", username: "alinkler" },
{ name: "Beatriz Viterbo", username: "bv1945" },
{ name: "Charles Burns", username: "charlesb" },
{ name: "Dr. Strangelove", username: "drstrnglv" },
{ name: "Edward Meechum", username: "em_hoc" },
{ name: "FN-2187", username: "fn2187" },
{ name: "Gertie Barrimore", username: "gertie_b" },
{ name: "Holden Caulfield", username: "hcaulfield" },
@thewarpaint
thewarpaint / day-1.js
Last active December 31, 2015 00:17
Advent of code
function calcFloor(input) {
var up = 0,
down = 0,
basement = 0,
i;
for(i=0; i<input.length; i++) {
input[i] === '(' ? up++ : down++;
if(!basement) {
@thewarpaint
thewarpaint / README.md
Last active January 11, 2018 16:01
`Highcharts.dateFormat` reference

Highcharts.dateFormat reference

  • %a: Short weekday, like ‘Mon’
  • %A: Long weekday, like ‘Monday’
  • %d: Two digit day of the month, 01 to 31
  • %e: Day of the month, 1 through 31
  • %b: Short month, like ‘Jan’
  • %B: Long month, like ‘January’
  • %m: Two digit month number, 01 through 12
  • %y: Two digits year, like 09 for 2009
@thewarpaint
thewarpaint / README.md
Last active September 4, 2015 04:33
Google Time Machine!

Google Time Machine!

Execute any of the code snippets below on google.com to randomize your logo and favicon. Works also for any other regional Google.com page.

@thewarpaint
thewarpaint / flat-ui.json
Last active August 29, 2015 14:23
Color Palette
{
"name": "Flat UI",
"colors": [
{
"name": "Turquoise",
"variable": "$palette-turquoise",
"color": "#1abc9c"
},
{
"name": "Green Sea",