Skip to content

Instantly share code, notes, and snippets.

View danielfilho's full-sized avatar

daniel filho danielfilho

View GitHub Profile
@danielfilho
danielfilho / braziljs-2014-talks.md
Last active November 27, 2022 21:04
Talks, slides and links from BrazilJS 2014

#BrazilJS 2014

Talks: slides & Links

Day Talk Speaker Links
1 Why ServiceWorker may be the next big thing Renato Mangini interview · slides · video
1 Frontend at Scale - The Tumblr Story Chris Miller interview · slides · video
1 Intro to GFX: Raw WebGL Nick Desaulniers interview · slides · video
@danielfilho
danielfilho / mic-toggle.ahk
Last active February 3, 2022 19:01
Mic toggle shortcut on Windows with AutoHotKey
; Replace the "8" below for the number of your interface
f13::
SoundSet, +1, MASTER, mute, 8
SoundGet, master_mute, , mute, 8
ToolTip, Mute %master_mute%
SetTimer, RemoveToolTip, 1000
return
@danielfilho
danielfilho / incidens_and_newcases.js
Last active October 27, 2020 10:58
Kombination der Covid-19 Neuinfektionen und der Inzidenz-Zahl für die aktuelle Location. Inspiriert von https://gist.github.com/kevinkub/46caebfebc7e26be63403a7f0587f664
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0
// Define URLs based on the corona.rki.de webpage
const newCasesApiUrl = `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_COVID19/FeatureServer/0/query?f=json&where=NeuerFall%20IN(1%2C%20-1)&returnGeometry=false&spatialRel=esriSpatialRelIntersects&outFields=*&outStatistics=%5B%7B%22statisticType%22%3A%22sum%22%2C%22onStatisticField%22%3A%22AnzahlFall%22%2C%22outStatisticFieldName%22%3A%22value%22%7D%5D&resultType=standard&cacheHint=true`;
const incidenceUrl = (location) =>
`https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=1%3D1&outFields=GEN,cases7_per_100k&geometry=${location.longitude.toFixed(
3
)}%2C${location.latitude.toFixed(
3
)}&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&returnGeometry=false&outSR=4326&f=json`;
@danielfilho
danielfilho / bamboozled.json
Last active June 9, 2019 23:59
The layout of my DZ60 Bamboo board
{
"keyboard":"dz60",
"keymap":"dz60_default",
"layout":"LAYOUT_60_ansi",
"layers":[
[
"KC_GESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSPC",
"KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSLS",
"KC_LCTL", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_ENT",
"KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT",
@danielfilho
danielfilho / keymap.c
Last active March 18, 2019 00:30
Custom keymap + Default (on comments below). Better safe than sorry.
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, KC_DEL,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, MO(1), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ZOFE - Zone Of Front-Enders]]></title><description><![CDATA[Podcast com enfoque no desenvolvimento front-end da web. Sempre trazendo novidades, entrevistas, eventos e multiplicando conhecimento. Este podcast é apresentado por Daniel Filho e Isa Silveira.]]></description><link>https://zofe.com.br</link><generator>RSS for Node</generator><lastBuildDate>Sun, 10 Mar 2019 16:55:03 GMT</lastBuildDate><author><![CDATA[Zone Of Front-Enders]]></author><item><title><![CDATA[A Treta Do CSS]]></title><description><![CDATA[Tretas? Polêmicas? O Daniel gosta de CSS? A Isa gosta de CSS? Nossa opinião de um "flamezinho" que apareceu no twitter há pouco tempo.
Ficamos um tempinho (BEM curto, se comparado há outros), mas foi pra gente ajeitar um monte de coisas nas nossas vidas. Mas agora voltamos pra nossa
➜ zofe git:(refactory) ✗ npx npm-check-updates -u
npx: installed 117 in 16.996s
Using {...}/zofe/package.json
core-js ^2.5.7 → ^2.6.5
gatsby ^2.0.52 → ^2.1.24
gatsby-cli ^2.4.5 → ^2.4.13
gatsby-plugin-feed ^2.0.9 → ^2.0.14
gatsby-plugin-manifest ^2.0.9 → ^2.0.22
gatsby-plugin-offline ^2.0.15 → ^2.0.24
@danielfilho
danielfilho / gd.sh
Created October 20, 2018 10:47
I had a problem that Gatsby develop mode (watch/compile) wasn't working properly. I found that exposing the env var `CHOKIDAR_USEPOLLING` as `1` make it work. This is the following script I use on a Windows 10 PC, running WSL with Ubuntu
#!/bin/bash
export CHOKIDAR_USEPOLLING=1
./node_modules/.bin/gatsby develop --host localhost

Validação para cartão de crédito.

Bin e padrões para validação de cartão de crédito.

Bandeira Comeca com Máximo de número Máximo de número cvc
Visa 4 13,16 3
Mastercard 5 16 3
Diners 301,305,36,38 14,16 3
@danielfilho
danielfilho / vaga-zofe-trampos.md
Last active February 9, 2018 07:00
formato de publicação de vaga para o ZOFE trampos -- http://zofe.com.br/trampos

desenvolvedor front-end jr

nome da empresa

(região da av. paulista, são paulo - sp || remoto)

  • regime: CLT
  • escolaridade: segundo grau completo
  • conhecimento necessário:
    • html (5)
  • css (5)