Skip to content

Instantly share code, notes, and snippets.

View davebra's full-sized avatar

Davide Bragagnolo davebra

View GitHub Profile
@davebra
davebra / LambdaFucntion.js
Created May 9, 2019 02:33
Serverless Country Lookup with AWS (Lambda+CloudFront)
"use strict";
// countryLookup solves the Cloudfront website use-case
/*
Typical Cloudfront event structure to consume:
{
"Records": [
{
"cf": {
@davebra
davebra / .gitignore
Created September 11, 2018 23:59
Gitignore common list, check before usage
##### add your files to ignore
# examples:
# database.php
# folder/file.php
# folder/allfiles/*
##### OS generated files
.DS_Store
.DS_Store?
._*
@davebra
davebra / README-Template.md
Created July 3, 2018 07:30 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@davebra
davebra / ext.txt
Created July 3, 2018 04:58 — forked from chronon/ext.txt
List of docker-php-ext-install extension names
Possible values for ext-name:
bcmath
bz2
calendar
ctype
curl
dba
dom
enchant
@davebra
davebra / html_inputs_mobile_numpad.html
Last active June 21, 2018 04:12
Input type for numbers mobile numpad keyboard (useful for credit cards)
<label for="tel">Tel</label>
<input id="tel" type="tel">
<label for="telp">Tel pattern=[0-9]*</label>
<input id="telp" type="tel" pattern="[0-9]*">
<label for="nump">Number pattern=[0-9]*</label>
<input id="nump" type="number" pattern="[0-9]*">
<!-- preferred for semantic and compatibility -->
@davebra
davebra / loading_spinners.css
Last active December 10, 2023 22:39
Simple gif loading spinners as data uri in css background
/* lightweight transparent background grey spinner */
element {
min-width: 32px;
min-height: 32px;
background-repeat: no-repeat;
background-image: url(data:image/gif;base64,R0lGODlhIAAgAPUAAP///15eXvv7+9nZ2fDw8PX19eHh4a2trb+/v/j4+O7u7vz8/Lm5ubKysuzs7NHR0cLCwvLy8svLy+jo6IWFhZSUlJqamqysrMfHx/Pz84yMjKKiomVlZV5eXt/f39vb2+bm5nl5eZmZmXBwcI2NjczMzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAIAAgAAAG/0CAcEgkFjgcR3HJJE4SxEGnMygKmkwJxRKdVocFBRRLfFAoj6GUOhQoFAVysULRjNdfQFghLxrODEJ4Qm5ifUUXZwQAgwBvEXIGBkUEZxuMXgAJb1dECWMABAcHDEpDEGcTBQMDBQtvcW0RbwuECKMHELEJF5NFCxm1AAt7cH4NuAOdcsURy0QCD7gYfcWgTQUQB6Zkr66HoeDCSwIF5ucFz3IC7O0CC6zx8YuHhW/3CvLyfPX4+OXozKnDssBdu3G/xIHTpGAgOUPrZimAJCfDPYfDin2TQ+xeBnWbHi37SC4YIYkQhdy7FvLdpwWvjA0JyU/ISyIx4xS6sgfkNS4me2rtVKkgw0JCb8YMZdjwqMQ2nIY8BbcUQNVCP7G4MQq1KRivR7tiDEuEFrggACH5BAkKAAAALAAAAAAgACAAAAb/QIBwSCQmNBpCcckkEgREA4ViKA6azM8BEZ1Wh6LOBls0HA5fgJQ