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" |
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
@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
-- 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
from django.contrib.admin import SimpleListFilter | |
class NullListFilter(SimpleListFilter): | |
def lookups(self, request, model_admin): | |
return ( | |
('1', 'Null',), | |
('0', '!= Null',), | |
) |
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
global | |
maxconn 2048 | |
defaults | |
mode http | |
timeout connect 5000ms | |
timeout client 90000ms | |
timeout server 90000ms | |
frontend secure-http-in |
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
FROM python:2.7.13 | |
MAINTAINER Albert Lacarta <[email protected]> | |
ADD requirements.txt /opt/requirements.txt | |
RUN pip install -r /opt/requirements.txt | |
RUN mkdir -p /opt/code | |
WORKDIR /opt/code | |
ADD supervisord.conf /etc/supervisord.conf | |
CMD supervisord -c /etc/supervisord.conf |
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
FROM node:7.9.0 | |
MAINTAINER Albert Lacarta <[email protected]> | |
RUN npm install -g [email protected] && \ | |
npm install -g node-sass && \ | |
npm install -g http-server && \ | |
npm install -g gulp-cli | |
# Install circus to handle processes | |
RUN apt-get update && apt-get install -y python-pip python python-dev |
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
/* Applies ellipsis to the text container */ | |
.text-elipsis { | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
} |
OlderNewer