Skip to content

Instantly share code, notes, and snippets.

View coolchevy's full-sized avatar

Vitalii coolchevy

View GitHub Profile
@coolchevy
coolchevy / workspace.sh
Created May 25, 2016 22:09 — forked from dixson3/workspace.sh
Create and manage a case-sensitive disk-image on OSX. This is great when you have a need to work with case-sensitive repos on a mac.
#!/bin/bash
# where to store the sparse-image
WORKSPACE=~/Documents/workspace.dmg.sparseimage
create() {
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 60g -volname workspace ${WORKSPACE}
}
detach() {
@coolchevy
coolchevy / gist:7215067
Created October 29, 2013 13:52
erlang_localtime Europe/Minsk Fix
diff --git a/include/tz_database.hrl b/include/tz_database.hrl
index 67e9c57..48a2a33 100644
--- a/include/tz_database.hrl
+++ b/include/tz_database.hrl
@@ -339,7 +339,7 @@
{"Europe/Luxembourg",{"CET","CET"},{"CEST","CEST"},60,60,{last,sun,mar},{2,0},{last,sun,oct},{3,0}},
{"Europe/Madrid",{"CET","CET"},{"CEST","CEST"},60,60,{last,sun,mar},{2,0},{last,sun,oct},{3,0}},
{"Europe/Malta",{"CET","CET"},{"CEST","CEST"},60,60,{last,sun,mar},{2,0},{last,sun,oct},{3,0}},
- {"Europe/Minsk",{"EET","EET"},{"EEST","EEST"},120,60,{last,sun,mar},{2,0},{last,sun,oct},{3,0}},
+ {"Europe/Minsk",{"FET","FET"},undef,180,0,undef,{0,0},undef,{0,0}},
@coolchevy
coolchevy / timezone_countries.hrl
Last active December 14, 2015 01:09
country to timezone lookup
%% from http://dev.maxmind.com/static/csv/codes/time_zone.csv
-define(TZ_COUNTRIES, [
{"US","AL","America/Chicago"},
{"US","AK","America/Anchorage"},
{"US","AZ","America/Phoenix"},
{"US","AR","America/Chicago"},
{"US","CA","America/Los Angeles"},
{"US","CO","America/Denver"},
{"US","CT","America/New York"},