Skip to content

Instantly share code, notes, and snippets.

View danielfilho's full-sized avatar

daniel filho danielfilho

View GitHub Profile
@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`;
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@danielfilho
danielfilho / httpdump
Last active August 29, 2015 14:16 — forked from peterc/httpdump
# Monitor HTTP requests being made from your machine with a one-liner..
# Replace "en1" below with your network interface's name (usually en0 or en1)
sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*"
# OR.. to be able to use as "httpdump" from anywhere, drop this into ~/.bash_profile:
# (again replace "en1" with correct network interface name)
alias httpdump="sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*""
# All the above tested only on OS X.
@danielfilho
danielfilho / upgrade.sh
Last active August 29, 2015 14:14 — forked from dserodio/upgrade.sh
if [ -z $1 ]
then
if [ "$OS" == "Darwin" ]
then
echo "Updating…"
brew update
echo "Upgrading…"
brew upgrade
else
sudo apt-get update

Screencapture and animated gifs

I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).

Capturing (Easy)

  1. Launch quicktime player
  2. do Screen recording

screen shot 2014-10-22 at 11 16 23 am

Desenvolvedor Front-end para Startup Agressora

Agrid

Belo Horizonte || Remoto

  • regime: PJ
  • conhecimento necessário:
    • html (5)
    • css (4)
  • javascript (3)

desenvolvedor front-end jr

Trendi

(região da berrini, são paulo - sp)

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

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

front-end dev

leroy merlin

(região de interlagos, são paulo - sp)

  • # de vagas: 2
  • regime: CLT
  • escolaridade: 3º grau completo