Skip to content

Instantly share code, notes, and snippets.

@cooljl31
cooljl31 / Castle.xml
Created September 10, 2017 12:50 — forked from kwmt/Castle.xml
<?xml version="1.0" encoding="UTF-8" ?>
<Data>
<Series>
<id>83462</id>
<Actors>|Nathan Fillion|Stana Katic|Molly C. Quinn|Jon Huertas|Seamus Dever|Tamala Jones|Susan Sullivan|Ruben Santiago-Hudson|Monet Mazur|</Actors>
<Airs_DayOfWeek>Monday</Airs_DayOfWeek>
<Airs_Time>10:00 PM</Airs_Time>
<ContentRating>TV-PG</ContentRating>
<FirstAired>2009-03-09</FirstAired>
<Genre>|Drama|</Genre>
@cooljl31
cooljl31 / mysql.database.yml
Created September 8, 2017 11:08 — forked from jwo/mysql.database.yml
Sample config/database.yml from Rails. Postgres, MySQL, and SQLite
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
@cooljl31
cooljl31 / dev-env-first-run-ubuntu-14.04.sh
Created September 8, 2017 09:12
Basic Ubuntu 14.04 Developer Environment Configuration - First Run => sudo wget -q -O - https://gist.github.com/leodutra/2659acd9c9ffdd7c2f03/raw | bash -
#!/bin/sh
echo "STARTING ENVIRONMENT INSTALL ----------------"
log_wait() {
echo -ne "$1... (please wait)"\\r
global_last_log_wait=$1
}
log_done() {
@cooljl31
cooljl31 / Sample Docker Web Application.md
Created August 25, 2017 08:20 — forked from koistya/Sample Docker Web Application.md
Sample Docker-based web application setup

Docker-based Web Application Setup (example)

This is an example of hosting standalone web front-end (web) and data API (api) applications under the same domain via Nginx (acting as a reverse proxy) and Docker, where HTTP requests starting with example.com/graphql and example.com/login/* are being redirected to http://api:3000 and everything else under the same domain is going to be passed to http://web:3000.

Folder Structure

.
├── /nginx.sites/               # Server configuration for each of web apps
├── /nginx.snippets/            # Nginx code snippets
@cooljl31
cooljl31 / .bashrc
Created August 17, 2017 18:48 — forked from vsouza/.bashrc
Golang 1.5 setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@cooljl31
cooljl31 / docker_aliases.sh
Created August 17, 2017 06:29 — forked from vshank77/docker_aliases.sh
Docker clean up commands
alias dockstart='docker-machine start default'
alias dockrestart='docker-machine restart default'
alias dockstop='docker-machine stop default'
alias dock='eval "$(docker-machine env default)"'
alias dockswm='eval "$(docker-machine env -swarm swarm-master)"'
alias dps='docker ps -a'
alias dqf='docker images -qf "dangling=true"'
alias ddqf='docker rmi -f $(docker images -qf "dangling=true")'
alias ddrmi='docker rmi -f $(docker images | grep -e "latest" -e "SNAPSHOT" | awk '"'"'{print $3}'"'"')'
alias dimg='docker images'
@cooljl31
cooljl31 / img-conv-for-slack-emoji
Created August 7, 2017 10:47 — forked from mugifly/img-conv-for-slack-emoji
Image Converter for Slack Emoji (128px) - Required: ImageMagick.
#!/bin/bash
set -e
echo -e "Image Converter for Slack Emoji\nNOTICE: The image will be overwritten."
if [ $# -lt 1 ]; then
echo "USAGE:"
echo -e " ${0} IMG_FILE [IMG_FILE...]\n"
echo "IMG_FILE:"
@cooljl31
cooljl31 / CtrlP_acceleration
Created July 27, 2017 20:08 — forked from davidmh/CtrlP_acceleration
Accelerate CtrlP by ignoring certain files and paths. Including node modules and grunt's .tmp
" Ignore some folders and files for CtrlP indexing
let g:ctrlp_custom_ignore = {
\ 'dir': '\.git$\|\.yardoc\|node_modules\|log\|tmp$',
\ 'file': '\.so$\|\.dat$|\.DS_Store$'
\ }
@cooljl31
cooljl31 / deploy.rb
Created July 16, 2017 11:05 — forked from btoone/deploy.rb
Example Capistrano configuration for multi stage deployment
# app/config/deploy.rb
# Most of the changes specific to your environment will be set in
# the `app/config/deploy/[env].rb` files.
# define multiple deployments
set :stages, %w(production staging)
set :default_stage, "staging"
@cooljl31
cooljl31 / docker-pry-rails.md
Created July 16, 2017 08:30 — forked from briankung/docker-pry-rails.md
Using pry-rails with Docker