Skip to content

Instantly share code, notes, and snippets.

View danielfilho's full-sized avatar

Daniel danielfilho

  • Germany
  • 16:25 (UTC +01:00)
View GitHub Profile
@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",
<?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 / 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,
@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
@danielfilho
danielfilho / daniel.cfg
Last active July 20, 2017 17:38
csgo config
// demonahz default cfg
bind f +lookatweapon
bind "leftarrow" "cl_righthand 0"
bind "rightarrow" "cl_righthand 1"
// game info
+cl_show_team_equipment 1
//cl_crosshairdot "0"
//cl_autowepswitch "0"
//cl_use_opens_buy_menu "0"
@danielfilho
danielfilho / vende-changelog.md
Last active February 12, 2016 15:37
Changelog pras coisas que estou vendendo em http://dnl.pw

/vende Changelog

11/02/2016

  • ✏ Kit Spark IO

11/02/2016

  • ➕ iPhone 5 32GB
  • ➕ Elevator

10/02/2016

@danielfilho
danielfilho / .git_commit_msg.txt
Created October 21, 2015 16:25
Template for commit messages.
# If this commit is applied, it will:
# Why was this change made?
# Any references to tickets, articles etc?