Skip to content

Instantly share code, notes, and snippets.

View DrummerHead's full-sized avatar
💭
Eternally Elated

DrummerHead DrummerHead

💭
Eternally Elated
View GitHub Profile
I would like you to perform a step by step analysis of a statement presented below. The statement is a question that can have a true or false answer, accompanied with an explanation of why the ending conclusion is either true or false.
In the process of analysis, first claim that the answer to the question is true, and then explain why it would make sense for the answer to be true.
In the process of analysis, then claim that the answer to the question is false, and then explain why it would make sense for the answer to be false.
After having performed the two questions, perform a final analysis in which you analyze both answers for either true or false and which one of the answers seems to be the correct answer.
Your answer will be in the format of:
@DrummerHead
DrummerHead / ReactiveConf-2019.md
Last active November 4, 2019 12:23
ReactiveConf 2019 Resume

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

" 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 September 24, 2017 21:13
See github stars on a list of projects
// 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}`)

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!

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.

// 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 March 15, 2018 16:16
Prepend exif date to file name
#!/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 October 11, 2016 13:37
Write a markdown file for documenting the tasks of the day
#!/usr/bin/env ruby
require 'time'
def titleForMd argument
argument ? " - #{argument}" : ''
end
def titleForFilename argument
argument ? argument.gsub(/\s/, '-') : 'tasks'
// 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');
#!/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