Skip to content

Instantly share code, notes, and snippets.

View wayneeseguin's full-sized avatar
🤪

Wayne E Seguin wayneeseguin

🤪
View GitHub Profile
@wayneeseguin
wayneeseguin / gist:1503575
Created December 20, 2011 22:25
SM Framework PostgreSQL Extension Set

Install PostgreSQL Extension Set

[root@sl2 ~]# sm set install postgresql
  [✔] postgresql head                         

Replication

Setup

postgres@replica$ postgresql replication configure master 10.0.5.211 replica 10.0.5.212
@wayneeseguin
wayneeseguin / gist:1478154
Created December 14, 2011 19:47
List installed then available postgresql extensions
postgres=# \dx
List of installed extensions
Name | Version | Schema | Description
---------+---------+------------+------------------------------
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
(1 row)
postgres=# \dx+
Objects in extension "plpgsql"
Object Description
# bash based sh version
# partition for swap
if [[ "${MACHTYPE%%-*}" == 'x86_64' ]] # where was '$(arch)' comming from?
then
SWAPSIZE=$[$(free -m | awk '/^Mem:/{print $2}')*2]
if (( SWAPSIZE > 4096 ))
then
SWAPSIZE=4096
@wayneeseguin
wayneeseguin / gist:1203167
Created September 8, 2011 11:12
Fission for VMWare Fusion with RVM

Fission for VMWare Fusion with RVM

If you use VMWare Fusion on OSX and would like to control it on the command line then fission by @thbishop is worth trying out!

Fission is new and only only has a few features but looks very promising to me, I will be keeping an eye on it for one.

Creating an RVM Wrapper for fission

[root@sl6base ~]# ./array_test
4=4 :a b c d:
3=3 :a b c:
2=2 :b c: ${arr[0]}= ${arr[1]}=b ${arr[2]}=c
2=2 :b c: ${arr[0]}=b ${arr[1]}=c ${arr[2]}=
1=1 :c:
@wayneeseguin
wayneeseguin / gist:1161662
Created August 22, 2011 04:33
SM Framework Latest Release Installation
version=$(curl -ks https://sm.beginrescueend.com/releases/latest-version.txt) &&
curl -k -L -O https://sm.beginrescueend.com/releases/sm-${version}.tar.bz2 &&
tar jxf sm-${version}.tar.bz2 &&
cd sm-${version} &&
./install
#!/bin/bash
exec /usr/local/rvm/bin/rvm 1.9.2 exec god -D
test X"$ERTS_SKIP_DEPEND" = X"true" || (cd erts/emulator && ERL_TOP=/sm/src/otp_src_R13B04 make generate depend)
make[1]: Entering directory `/sm/src/otp_src_R13B04/erts/emulator'
make -f x86_64-unknown-linux-gnu/Makefile generate
make[2]: Entering directory `/sm/src/otp_src_R13B04/erts/emulator'
/bin/mkdir -p x86_64-unknown-linux-gnu/opt/plain
/bin/mkdir -p obj/x86_64-unknown-linux-gnu/opt/plain
/bin/mkdir -p pcre/obj/x86_64-unknown-linux-gnu/opt
/bin/mkdir -p zlib/obj/x86_64-unknown-linux-gnu/opt
LANG=C /usr/bin/perl utils/beam_makeops -outdir x86_64-unknown-linux-gnu/opt/plain \
-emulator /sm/src/otp_src_R13B04/lib/compiler/src/genop.tab beam/ops.tab hipe/hipe_ops.tab
[root@sl6base riak-0.14.2]# make rel
fatal: Not a git repository (or any of the parent directories): .git
./rebar get-deps
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
Uncaught error in rebar_core: {'EXIT',
{undef,
[{crypto,start,[]},
{rebar,run_aux,1},
@wayneeseguin
wayneeseguin / bdsm-install-head.sh
Created August 8, 2011 01:11
bash script to install bdsm
#!/bin/bash -e
if ! command -v git > /dev/null
then
echo "git is required in order to install the latest development BDSM version."
echo "Please install git ( http://git-scm.com/ ) and then try again."
fi
if (( UID == 0 ))
then