Skip to content

Instantly share code, notes, and snippets.

Avatar

Iñaki Abete inakiabt

View GitHub Profile
View mapWithLoop.html
<!DOCTYPE html>
<html>
<head>
<style>
#map {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
position: absolute;
View loopOptimizer.py
#!/usr/bin/env python2
import json
import random
import copy
import googlemaps
import math
import os.path
import datetime
def distanceFromLarAndLon(lon1, lat1, lon2, lat2):
@leonardofed
leonardofed / README.md
Last active Dec 3, 2020
A curated list of AWS resources to prepare for the AWS Certifications
View README.md


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


View Dockerfile
FROM python:2.7-alpine
MAINTAINER Nick Janetakis <nick.janetakis@gmail.com>
ENV INSTALL_PATH /bsawf
RUN mkdir -p $INSTALL_PATH
WORKDIR $INSTALL_PATH
COPY requirements.txt requirements.txt
RUN apk add --no-cache --virtual .build-deps \
@bmhatfield
bmhatfield / .profile
Last active Nov 24, 2020
Automatic Git commit signing with GPG on OSX
View .profile
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@lenaten
lenaten / gist:96f7102c92b3a7d59a50
Last active Dec 6, 2017
Hosting React app in s3 with CloudFront
View gist:96f7102c92b3a7d59a50
- create s3 bucket, for example: react.
- create cloudfront distributions with these settings:
- Default Root Object: index.html
- Origin Domain Name: s3 bucket url, for example: react.s3.amazonaws.com
- add custom error page with these settings:
- HTTP Error Code: 403: Forbidden
- Customize Error Response: Yes
- Response Page Path: /index.html
- HTTP Response Code: 200: OK
@tanzaho
tanzaho / imageSyncing.js
Last active Apr 15, 2020
AWS Lambda - S3 : Thumbnail creation
View imageSyncing.js
// dependencies
var async = require('async');
var path = require('path');
var AWS = require('aws-sdk');
var gm = require('gm').subClass({
imageMagick: true
});
var util = require('util');
// get reference to S3 client
var s3 = new AWS.S3();
@telekosmos
telekosmos / uniq.js
Last active Aug 4, 2020
Remove duplicates from js array (ES5/ES6)
View uniq.js
var uniqueArray = function(arrArg) {
return arrArg.filter(function(elem, pos,arr) {
return arr.indexOf(elem) == pos;
});
};
var uniqEs6 = (arrArg) => {
return arrArg.filter((elem, pos, arr) => {
return arr.indexOf(elem) == pos;
});
@manifestinteractive
manifestinteractive / app_store_asset_requirements.md
Last active Apr 5, 2019
iOS App Store Asset Requirements
View app_store_asset_requirements.md

iOS App Store Asset Requirements

Here are the following things we will need to submit our app in the iOS App Store.

Text Requirements:

  • Name: ( The name of your app as it will appear on the App Store. This can't be longer than 255 characters. )
  • Version: ( The version number is shown on the App Store and should match the one you used in Xcode. )
@crazygit
crazygit / save_docker_images
Last active Apr 6, 2016
Save all docker images to tar files for copy to another machine
View save_docker_images
#!/usr/bin/env bash
####################################################################
# Usage:
# Save all docker images to tar files for copy to another machine
####################################################################
images=$(docker images | awk 'NR>1 && $1 != "<none>" {printf("%s:%s\n", $1, $2)}')
for image in $images
do
You can’t perform that action at this time.