Skip to content

Instantly share code, notes, and snippets.

View Epigene's full-sized avatar

Augusts Bautra Epigene

View GitHub Profile
@Epigene
Epigene / Droplet_Image_Setup
Created September 3, 2014 07:53
Droplet Image Setup
##
## Here is what image already has
##
#add repos
add-apt-repository ppa:nginx/stable
add-apt-repository ppa:chris-lea/node.js
sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
@Epigene
Epigene / Droplet_from_Image
Last active August 29, 2015 14:06
Droplet from Creative Image
# Postgres database
# Check online for the newst version number
sudo apt-get -y install postgresql-common postgresql-9.3
sudo -u postgres psql
# create database <app> owner creative;
# Configure GIT
git config --global user.name "<YourGitName>"
Copy the CapPack into project directory replacing existing files
# CapPack at
Edit contents of config/deploy to reflect Swisslanguages -> <appname>
@Epigene
Epigene / Nginx Examples
Created September 12, 2014 12:42
Nginx default examples
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts to this file
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
========== SSL certs for FDL ==========
Staging:
1. $ openssl req -sha1 -newkey rsa:2048 -keyout 1216308_key.pem -out 1216308_req.pem -subj "/C=LV/O=www.stockholmhealth.com/CN=1216308" -outform PEM -config openssl.cnf
2. Ielogojamies IBIS un self-sign
3. Iemetam no šiem saņemtos failus (viņi atsūta sertifikātu pirms atbildes, ka atsūtīs sertifikātu) tai pašā mapē, kur key un:
4. $ openssl pkcs12 -export -in 1216308.pem -out 1216308.p12 -certfile ECOMM.pem -inkey 1216308_key.pem
5. $ openssl pkcs12 -in 1216308.p12 -out 1216308_keystore.pem
@Epigene
Epigene / config.fish
Last active August 29, 2015 14:06
Server ~/.config/fish/config.fish
# Be sure to change <appname> and <dbname> to real values
# Path to your oh-my-fish.
set fish_path $HOME/.oh-my-fish
# Load oh-my-fish configuration.
. $fish_path/oh-my-fish.fish
# Custom plugins and themes may be added to ~/.oh-my-fish/custom
# Plugins and themes can be found at https://github.com/oh-my-fish/
@Epigene
Epigene / private.xml
Created October 2, 2014 11:21
Karabiner's Private.xml config
<?xml version="1.0"?>
<root>
<item>
<name>Swap Paragraph-Hash key to Del</name>
<identifier>private.swap_para_and_del</identifier>
<autogen>__KeyToKey__ KeyCode::DANISH_DOLLAR, KeyCode::FORWARD_DELETE</autogen>
</item>
<item>
<name>Swap Space and Tab</name>
@Epigene
Epigene / gist:5bfac6cf1756b5f876b3
Last active August 29, 2015 14:07
Mina Workflow
# place in Gemfile, then bundle
gem 'mina'
# Initialize mina to get deploy.rb
mina init
# In deploy.rb uncomment your ruby manager (Creative uses rvm, so)
#require 'mina/rbenv'
require 'mina/rvm'
@Epigene
Epigene / pg_search.rb
Created October 13, 2014 12:56
pg_search install
========= pg_search Workflow =========
# add to gemfile and bundle
gem 'pg_search', '0.7.8' # # Empowers PostgreSQL-driven ActiveRecord
# setup addon migrations
rails g migration add_contrib_extensions
class AddContribExtensions < ActiveRecord::Migration
def up
execute 'CREATE EXTENSION pg_trgm;'