Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Eternally Elated

DrummerHead DrummerHead

💭
Eternally Elated
View GitHub Profile
@DrummerHead
DrummerHead / ReactiveConf-2019.md
Last active Nov 4, 2019
ReactiveConf 2019 Resume
View ReactiveConf-2019.md

ReactiveConf 2019 Resume

Hi my people! I'm back from Prague where I attended https://reactiveconf.com/

Since I consumed the whole thing, I'll give you all a curated resume of the talks I found interesting and think could be interesting for you to watch.

Backpressure: Resistance is NOT Futile

alt

View .vimrc
" Use the Solarized Dark theme
set background=dark
colorscheme desert
" let g:solarized_termtrans=1
" https://github.com/tpope/vim-pathogen
execute pathogen#infect()
" Make Vim more useful
set nocompatible
@DrummerHead
DrummerHead / getStarsOnTheFly.js
Last active Sep 24, 2017
See github stars on a list of projects
View getStarsOnTheFly.js
// On this URL
// https://github.com/markerikson/redux-ecosystem-links/blob/master/routing.md
// or this:
// https://github.com/MicheleBertoli/css-in-js
// or any place with links to a github repo;
// go to developer console and run:
const fetchStars = url => {
const [, user, repo] = url.match(/https:\/\/github.com\/([^\/]*)\/(.*)\/?$/);
return fetch(`https://api.github.com/repos/${user}/${repo}`)
View aprender-react.md

Como aprendí react

Aloha! Estos son artículos que leí que me ayudaron a agarrarle la mano a React. Leí bastantes cosas pero estas creo que encaran bastante, vamo!

Removing User Interface Complexity, or Why React is Awesome

Este articulo no te explica directamente React, sino que arranca a hacer un framework de juguete desde cero que cumple con la filosofía de React, y te va explicando por qué encara esto y no lo otro. Es como una especie de "te voy a explicar por qué el framework es así" y me parece que encara porque en vez de simplemente aceptar las cosas, ya de entrada podes aprender los motivos detrás de como son las cosas. Además tiene ejemplos en vivo y toda la magia, ta bueno.

Tutorial: Intro To React

View clapText.js
// Clap text generator
// ===================
// ## Function
//
const clapText = (text, { uppercase = false, tight = false } = {}) => {
const space = tight ? '' : ' ';
const newText = uppercase ? text.toUpperCase() : text;
return newText.replace(/\s/g, `${space}👏${space}`);
}
@DrummerHead
DrummerHead / prepend-exif-date.rb
Last active Mar 15, 2018
Prepend exif date to file name
View prepend-exif-date.rb
#!/usr/bin/env ruby
# Place this script in a folder full of images.
# After execution, it will rename all image files,
# prepending the date of shot taken to the
# original file name.
# https://github.com/tonytonyjan/exif
# gem install exif
@DrummerHead
DrummerHead / gen-task
Created Oct 11, 2016
Write a markdown file for documenting the tasks of the day
View gen-task
#!/usr/bin/env ruby
require 'time'
def titleForMd argument
argument ? " - #{argument}" : ''
end
def titleForFilename argument
argument ? argument.gsub(/\s/, '-') : 'tasks'
View memeText.js
// Use this script on your
// preferred modern browser console
const meme = (text) => {
return [...text.toUpperCase()].reduce((prev, curr, i, ary) => {
return [`${prev[0]}${ary[i]} `, `${prev[1]}\n${ary[i + 1] || ''} `];
}, ['','']).reduce((prev, curr) => prev + curr);
};
const result = meme('Aesthetics');
View wav-to-mp3
#!/usr/bin/env ruby
require 'shellwords'
wavs = Dir.glob("**/*.wav", File::FNM_CASEFOLD)
mp3s = Dir.glob("**/*.mp3", File::FNM_CASEFOLD)
puts "\n\n=================\n\n"
puts wavs
@DrummerHead
DrummerHead / analyze-launchctl-list
Created Mar 8, 2016
See what services you have running and remove any offenders ( more info: http://osxdaily.com/2011/03/08/remove-an-agent-from-launchd/ )
View analyze-launchctl-list
#!/usr/bin/env ruby
launch_data = %x[launchctl list].split("\n").drop(1)
launch_data_details = launch_data.map do |line|
line_data = line.split("\t")
{
pid: line_data[0],
status: line_data[1],
label: line_data[2]
}
You can’t perform that action at this time.