##References
##Create Rails App
command to make new directory:
mkdir AppName
global | |
log 127.0.0.1 local0 | |
log 127.0.0.1 local1 notice | |
maxconn 4096 | |
nbproc 1 | |
pidfile /var/run/haproxy.pid | |
user haproxy | |
group haproxy |
##References
##Create Rails App
command to make new directory:
mkdir AppName
# http://stackoverflow.com/a/8936202 | |
# | |
# ActiveAdmin already includes the necessary jquery in active_admin/base, | |
# so just add this to javascripts/active_admin.js after //= require active_admin/base | |
# | |
# | |
# Serialize and Sort | |
# | |
# model_name - you guessed it, the name of the model we are calling sort on. | |
# This is the actual variable name, no need to change it. |
#!/bin/bash | |
echo "Generating an SSL private key to sign your certificate..." | |
openssl genrsa -des3 -out myssl.key 1024 | |
echo "Generating a Certificate Signing Request..." | |
openssl req -new -key myssl.key -out myssl.csr | |
echo "Removing passphrase from key (for nginx)..." | |
cp myssl.key myssl.key.org | |
openssl rsa -in myssl.key.org -out myssl.key |
user nginx; | |
worker_processes 5; | |
error_log /var/log/nginx.error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
<?php | |
/** | |
* Template for ordering custom post types by terms on | |
* on the post types archive.php | |
* | |
* @package WordPress | |
* @author Justin Kopepasah | |
* | |
*/ |
//qTranslate hack for custom text input | |
//source input has to have class qtranslatable-input for this to work | |
var qtranslatable_inputs_init = function(){ | |
var selector = ".qtranslatable-input"; | |
jQuery(selector).each(function(index){ | |
var input_id = jQuery(this).attr("id"); | |
var input_class = jQuery(this).attr("class"); | |
var _this = this; | |
var integrated = jQuery(this).attr('value'); | |
var splitted = qtrans_split(integrated); |
/** | |
* qTranslate tabbed language chooser | |
*/ | |
//make enabled languages visible for javascript | |
function register_qtranslate_var() { | |
global $q_config; | |
wp_localize_script('jquery', 'Qtranslate', array( | |
'enabled_languages' => $q_config['enabled_languages'] | |
, 'current_language' => qtrans_getLanguage() |
#!/usr/bin/env bash | |
apt-get -y update | |
# Install dependencies | |
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev libcurl4-openssl-dev curl | |
# Install Ruby 1.9.3 from source | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz | |
tar -xvzf ruby-1.9.3-p194.tar.gz | |
cd ruby-1.9.3-p194/ | |
./configure --prefix=/usr/local |
#!/usr/bin/env ruby | |
# | |
# Mac fix 1 - Install the Nokogiri gem on Mac OS 10.9 Mavericks | |
# | |
# Usage: to configure and install using Bundler, pass in 'bundle' as an argument to the script. | |
# | |
# Nokogiri works at a very low level, so it has many issues on various platforms. | |
# As a result, the command `install gem nokogiri` often will fail. This fix is for | |
# errors involving 'libiconv', such as the following one I encountered: | |
# |