Skip to content

Instantly share code, notes, and snippets.

View dcurletti's full-sized avatar

Davide Curletti dcurletti

View GitHub Profile
<input type="text" id="fld_1003421_1">
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAy7pJbsg4gozI1KGhvHT7x1rVmVHVAc5E&libraries=places,geometry&callback=initAutocomplete"
async defer></script>
<script type="text/javascript" src="fireStationForm.js"></script>
var autocomplete, placesService, distanceService;
var componentForm = {
street_number: 'short_name',
route: 'long_name',
@dcurletti
dcurletti / start.sh
Created October 13, 2018 02:36
Setup Docker + Git on AWS EC2
sudo yum update -y
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
# log out and log back in
# install docker-compose
# https://docs.docker.com/compose/install/#install-compose
@dcurletti
dcurletti / ts-precommit.bash
Created September 27, 2018 23:46
Bash script to typecheck project on TypeScript file changes
#!/bin/bash
# You can make the script more generic by changing the matching pattern
SRC_PATTERN=".*\.(ts|tsx)$"
# needed bc env vars change when run inside a git hook
# https://stackoverflow.com/questions/3542854/calling-git-pull-from-a-git-post-update-hook
# https://serverfault.com/questions/107608/git-post-receive-hook-with-git-pull-failed-to-find-a-valid-git-directory
unset $(git rev-parse --local-env-vars)
@dcurletti
dcurletti / entry.js
Created February 18, 2016 06:06
Build AngularJS 1.x with Webpack and ES6
import Vendor from './vendor';
angular.module('appName', ['dependencies']).config( ('providers') => {
//defined routes, etc.
});
// This is explicitly called so that the app 'appName' is available when you require the rest of your Angular files
Vendor()
const $el = document.getElementById('elementWithNgApp') || document;
angular.bootstrap($el, 'appName')
@dcurletti
dcurletti / XJWrQW.markdown
Last active August 29, 2015 14:09
A Pen by Davide Curletti.

XJWrQW

A Pen by Davide Curletti on CodePen.

License.

Yo - I was wondering if you knew what was wrong with my jquery code to get the values of my buttons? Specifically lines 6 and 7. Line 5 works fine.

@dcurletti
dcurletti / index.html
Last active August 29, 2015 14:07
A Pen by Davide Curletti.
<div class="screen">
<p align="right"></p>
</div>
<div class="pad">
<div class="number">1</div>
<div class="number">2</div>
<div class="number">3</div>
<div class="number">4</div>
<div class="number">5</div>
<div class="number">6</div>