#!/bin/bash
yum install ncurses-devel openssl-devel -y
yum groupinstall "Development Tools" -y
cd /tmp
wget "http://erlang.org/download/otp_src_19.3.tar.gz" -O otp19.tar.gz
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
defmodule Foo.Helpers.UrlValidator do | |
def validate(url) do | |
case URI.parse(url) do | |
%URI{scheme: nil} -> {:error, "No scheme"} | |
%URI{host: nil} -> {:error, "No host"} | |
_ -> {:ok, url} | |
end | |
end | |
end |
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
#!/bin/bash | |
# /etc/init.d/minecraft | |
# version 0.4.2 2016-02-09 (YYYY-MM-DD) | |
# | |
### BEGIN INIT INFO | |
# Provides: minecraft | |
# Required-Start: $local_fs $remote_fs screen-cleanup | |
# Required-Stop: $local_fs $remote_fs | |
# Should-Start: $network | |
# Should-Stop: $network |
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
defmodule PrefixID do | |
@doc """ | |
Custom Ecto.Type use macro | |
Example: | |
use PrefixID, prefix: "secret_key" | |
After this, the Ecto type will have |
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
find ./src/ \( -not -path '*/\.*' -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.png' \) -exec ~/rsync -N --crtimes '{}' ./dist/ \; |
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
syntax enable | |
colorscheme cobalt2 | |
set tabstop=2 | |
set softtabstop=2 | |
set expandtab | |
" UI Config | |
set number | |
set showcmd |
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
// Card | |
box-shadow: | |
0 7px 14px 0 rgba(50,50,93,.1), | |
0 3px 6px 0 rgba(0,0,0,.07); | |
// Dropdown | |
box-shadow: | |
0 0 0 1px rgba(136,152,170,.1), | |
0 15px 35px 0 rgba(49,49,93,.1), | |
0 5px 15px 0 rgba(0,0,0,.08); |
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
# Creating a Digital Ocean droplet running Rails + Postgres with persistant storage and https | |
#-------------------------------------------------------------------------------------------- | |
# For your ctrl-D pleasure... | |
# SERVER_IP | |
# APP_NAME | |
# RAILS_SECRET (generate with `rails secret`) | |
# ADMIN_EMAIL | |
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
# Create S3 bucket in any region | |
# Change bucket policy | |
{ | |
"Version": "2018-06-06", | |
"Id": "Policy1528273129416", | |
"Statement": [ | |
{ | |
"Sid": "Stmt1528273125295", | |
"Effect": "Allow", |
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
update-locale LC_CTYPE=en_US.UTF-8 |