Skip to content

Instantly share code, notes, and snippets.

View cauli's full-sized avatar
🏳️

Cauli Ziani cauli

🏳️
View GitHub Profile
@cauli
cauli / lockcomposition.go
Last active August 29, 2017 17:28
Example explaining RWMutex composition on a struct
package main
import (
"fmt"
"sync"
"net/url"
"math/rand"
"strconv"
"time"
)
@cauli
cauli / google-maps-polygon-coordinates-tool.markdown
Created August 5, 2016 05:35
Google Maps Polygon Coordinates Tool

Google Maps Polygon Coordinates Tool

Outputs the coordinates (longitude, latitude) for Google Maps whenever the Polygon is moved or re-shaped. Recently added a 'Copy to Clipboard' button and had data output into a textarea for easier copying & pasting

I originally built this to build map outlines for neighborhoods, villages, districts and counties - specifically for real estate purposes.

A Pen by Cauli on CodePen.

License.

@cauli
cauli / rename3x.sh
Created May 12, 2015 19:44
Bash script to rename all images inside a folder to @3x. (Appending string to file names)
find . -iname "*.png" -exec bash -c 'mv "$0" "${0%\.png}@3x.png"' {} \;
find . -iname "*.jpg" -exec bash -c 'mv "$0" "${0%\.jpg}@3x.jpg"' {} \;
find . -iname "*.gif" -exec bash -c 'mv "$0" "${0%\.gif}@3x.gif"' {} \;