Skip to content

Instantly share code, notes, and snippets.

Jerry John Jacob jerryjohnjacob

Block or report user

Report or block jerryjohnjacob

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jerryjohnjacob
jerryjohnjacob / base_karma.conf.js
Created Nov 23, 2016
Basic Karma config for testing JS in a Rails project using Jasmine
View base_karma.conf.js
// Karma configuration
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
// frameworks to use
@jerryjohnjacob
jerryjohnjacob / upgrade_postgres.sh
Created Oct 6, 2016
Easy upgrade to postgres 9.6 with data migration
View upgrade_postgres.sh
sudo su postgres
pg_dumpall > full_backup
exit
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib libpgsql-ruby libpgtcl-dev postgresql-server-dev-9.6
# remove older postgres installation
@jerryjohnjacob
jerryjohnjacob / psql_utf8_encoding_fix.txt
Last active Oct 5, 2016 — forked from ffmike/psqlfix.txt
Change postgres default template0 to UTF8 encoding
View psql_utf8_encoding_fix.txt
mike@rbci:~$ psql -U postgres
psql (9.0.3)
Type "help" for help.
postgres=# update pg_database set datallowconn = TRUE where datname = 'template0';
UPDATE 1
postgres=# \c template0
You are now connected to database "template0".
template0=# update pg_database set datistemplate = FALSE where datname = 'template1';
UPDATE 1
@jerryjohnjacob
jerryjohnjacob / pkcs12_to_pem_script.sh
Last active Jul 19, 2018
Extracting keys from pkcs12
View pkcs12_to_pem_script.sh
openssl pkcs12 -in certificates/cert.p12 -out certificates/cert.pem -clcerts -nokeys
openssl pkcs12 -in certificates/cert.p12 -out certificates/key.pem -nocerts -nodes
openssl pkcs12 -in certificates/cert.p12 -out certificates/ca.cert -cacerts -nodes
@jerryjohnjacob
jerryjohnjacob / all-lein-templates.txt
Created Jun 28, 2016 — forked from anonymous/all-lein-templates.txt
for i in {1..28} ; do lein search lein-template $i ; done | grep '^\[' | perl -pe 's,^\[,,; s,/.*?],:,' | sort | uniq -c | tee all-lein-templates.txt
View all-lein-templates.txt
1 acorn: A Leiningen template for a ClojureScript setup with Figwheel, Austin, Om.
8 amp: Leiningen template for AMP (Alfresco Module Package) projects.
1 angular-cl2: A Leiningen template for using AngularJS and ChlorineJS
1 angular: Clojure and AngularJS in perfect harmony.
6 angular: Clojure and AngularJS in perfect harmony. $ lein new angular <name>
2 angularjs-app: Leiningen template for web application with http-kit and angularjs
5 angular-simple: Clojure and AngularJS $ lein new angular-simple <name>
1 aperiodic-cljs: My cljs development starting point. Basically ripped from lein-cljsbuild.
1 apijr: clojurescript project template
1 appfgo: 'lein new' template for Funcgo application
@jerryjohnjacob
jerryjohnjacob / 00.howto_install_phantomjs.md
Created Jan 4, 2016 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu
View 00.howto_install_phantomjs.md

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
View Rakefile
task :environment do
require './dj-sinatra'
end
namespace :jobs do
desc "Clear the delayed_job queue."
task :clear => :environment do
Delayed::Job.delete_all
end
@jerryjohnjacob
jerryjohnjacob / rvm-ruby-rails-pg
Created Nov 19, 2014
Setting up RVM, Ruby, Rails and PG
View rvm-ruby-rails-pg
sudo apt-get update
sudo apt-get upgrade
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --ruby
source /home/vagrant/.rvm/scripts/rvm
gem install rails
sudo apt-get install postgresql postgresql-contrib libpgsql-ruby libpgtcl-dev postgresql-server-dev-9.3
@jerryjohnjacob
jerryjohnjacob / pg-ubuntu-1204
Last active Oct 5, 2016
Postgresql on Ubuntu 12.04
View pg-ubuntu-1204
sudo apt-get install postgresql postgresql-contrib libpgsql-ruby libpgtcl-dev postgresql-server-dev-9.x
You can’t perform that action at this time.