This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- JSONB to text array | |
CREATE OR REPLACE FUNCTION jsonb_arr2text_arr(_js jsonb) | |
RETURNS text[] AS | |
$func$ | |
SELECT ARRAY(SELECT jsonb_array_elements_text(_js)) | |
$func$ | |
LANGUAGE sql IMMUTABLE; | |
-- JSONB to int array | |
CREATE OR REPLACE FUNCTION jsonb_arr2int_arr(_js jsonb) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin box_shadow ($level) { | |
@if $level == 1 { | |
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); | |
} @else if $level == 2 { | |
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); | |
} @else if $level == 3 { | |
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); | |
} @else if $level == 4 { | |
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clean the exited containers | |
docker rm $(sudo docker ps -a | grep Exit | cut -d ' ' -f 1) | |
# Clean the untagged images (or old images) | |
docker rmi $(docker images | tail -n +2 | awk '$1 == "<none>" {print $'3'}') | |
# On Docker 1.9+ you can remove the orphan volumes with the next command | |
docker volume rm $(docker volume ls -qf dangling=true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# List of country codes and country ens. | |
# | |
# Data taken from: http://openconcept.ca/blog/mgifford/text_list_all_countries | |
# | |
countries: | |
AF: | |
en: "Afghanistan" | |
es: "Afganistán" | |
fr: "Afghanistan" |
NewerOlder