ZIP,LAT,LNG | |
00601,18.180555, -66.749961 | |
00602,18.361945, -67.175597 | |
00603,18.455183, -67.119887 | |
00606,18.158345, -66.932911 | |
00610,18.295366, -67.125135 | |
00612,18.402253, -66.711397 | |
00616,18.420412, -66.671979 | |
00617,18.445147, -66.559696 |
#!/bin/bash | |
# Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462 | |
find . -type f -iname "*.png" -exec optipng -nb -nc {} \; | |
find . -type f -iname "*.png" -exec advpng -z4 {} \; | |
find . -type f -iname "*.png" -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \; | |
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec jpegoptim -f --strip-all {} \; |
Options included below:
- Using Docker
docker-compose
- Using Homebrew
brew
This gist was originally created for Homebrew before the rise of Docker, yet it may be best to avoid installing mysql via brew
any longer. Instead consider adding a barebones docker-compose.yml
for each project and run docker-compose up
to start each project's mysql service.
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
- Create a bare clone of the repository.
(This is temporary and will be removed so just do it wherever.)
git clone --bare git@github.com:usi-systems/easytrace.git
// Simple function to add a menu option to the spreadsheet "Export", for saving a PDF of the spreadsheet directly to Google Drive. | |
// The exported file will be named: SheetName and saved in the same folder as the spreadsheet. | |
// To change the filename, just set pdfName inside generatePdf() to something else. | |
// Running this, sends the currently open sheet, as a PDF attachment | |
function onOpen() { | |
var submenu = [{name:"Save PDF", functionName:"generatePdf"}]; | |
SpreadsheetApp.getActiveSpreadsheet().addMenu('Export', submenu); | |
} |
#!/bin/bash | |
command -v fswatch >/dev/null 2>&1 || { echo >&2 "fswatch is not installed. To install it use 'brew install fswatch'. Aborting."; exit 1; } | |
command -v mix >/dev/null 2>&1 || { echo >&2 "mix is not installed. Aborting."; exit 1; } | |
PROJECT_PATH=$(git rev-parse --show-toplevel) | |
[[ "$?" != "0" ]] && echo "Stale test watch works only within git project." && exit 1; | |
declare -a IGNORED_PATHS | |
declare -i throttle_by=2 |
defmodule Memoize do | |
@moduledoc """ | |
Simple memoization helper built on top of FastGlobal. | |
Remember to add `{:fastglobal, "~> 1.0"}` to your | |
dependencies first. | |
## Usage |
I have this abstraction in my application code called a "CloudFile". This is where I store in the database information about
files on S3 and it gives me a resource for other resources to own. For example, a user would have an avatar_cloud_file_id
.
On the front-end, I would load this relationship and display the avatar with user.avatar_cloud_file.download_url
defmodule RL.CloudFile do
use Ecto.Schema
import Ecto.Changeset
@timestamps_opts type: :utc_datetime_usec