Skip to content

Instantly share code, notes, and snippets.

View rastasheep's full-sized avatar

Aleksandar Diklic rastasheep

View GitHub Profile
@rastasheep
rastasheep / golang.sh
Created February 25, 2016 16:21
Steps to install golang 1.6 on Semaphore
wget https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz`
`sudo mkdir -p /usr/local/golang/1.6 && sudo tar -C /usr/local/golang/1.6 -xzf "go1.6.linux-amd64.tar.gz"`
`sudo rm /usr/local/bin/go && sudo ln -s /usr/local/golang/1.6/go/bin/go /usr/local/bin/go
@rastasheep
rastasheep / br.sh
Created October 20, 2015 06:52 — forked from dmkash/br.sh
Shell Script for tmux setup
#!/bin/sh
SESSION_NAME="big_red"
cd ~/Sites/within3/big_red
tmux has-session -t ${SESSION_NAME}
if [ $? != 0 ]
then
@rastasheep
rastasheep / pg_9.3.sh
Created May 19, 2015 15:13
Install PostgreSQL 9.3 on Semaphore
sudo apt-get -y remove postgresql-9.4 postgresql-contrib-9.4 postgresql-client-9.4 postgresql-server-dev-9.4
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
echo " deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get -y --force-yes install postgresql-client-9.3 postgresql-9.3 postgresql-contrib-9.3 postgresql-server-dev-9.3
sudo su - postgres -c "pg_dropcluster --stop 9.3 main"
sudo su - postgres -c "pg_createcluster --start -e UTF-8 9.3 main"
sudo su - postgres -c "psql -c \"CREATE USER runner WITH PASSWORD 'semaphoredb';\" -d template1"
sudo su - postgres -c "psql -c \"ALTER USER runner CREATEUSER CREATEDB;\" -d template1"
sudo service postgresql start || true
@rastasheep
rastasheep / README.md
Last active August 29, 2015 14:17 — forked from JoelBesada/README.md
Backtick command for GoDoc bookmarklet

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.
@rastasheep
rastasheep / rubinius_and_java.sh
Created March 17, 2015 21:24
Install rubinius 2.5.2 and OpenJDK 6 on SemaphoreCI
sudo apt-get update && sudo apt-get install -y libncurses5-dev llvm-3.5 llvm-3.5-dev java-common openjdk-6-jre openjdk-6-jdk build-essential libedit-dev
sudo update-java-alternatives -s java-1.6.0-openjdk-amd64
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64
RBENV_VERSION=2.1.2 RUBY_CONFIGURE_OPTS=--llvm-config=/usr/lib/llvm-3.5/bin/llvm-config rbenv install rbx-2.5.2
rbenv global rbx-2.5.2
# Check environment after setup
ruby --version
update-java-alternatives -l
java -version
@rastasheep
rastasheep / install.sh
Last active August 29, 2015 14:15
Install precompiled PHP 5.2.17 on Semaphore
#!/bin/bash
set -e
SRC_FILE="$SEMAPHORE_CACHE_DIR/php-5.2.17.tar.gz"
if [ ! -f "$SRC_FILE" ]
then
wget https://s3-us-west-2.amazonaws.com/container-libraries/languages/php/php-5.2.17.tar.gz -O $SRC_FILE
fi
@rastasheep
rastasheep / pg_9.4.sh
Last active July 11, 2017 20:10
Install PostgreSQL 9.4 on Semaphore
sudo apt-get remove -y postgresql-client-9.3 postgresql-9.3 postgresql-contrib-9.3 postgresql-server-dev-9.3
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
echo " deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get -y --force-yes install postgresql-9.4 postgresql-contrib-9.4
sudo su - postgres -c "pg_dropcluster --stop 9.4 main"
sudo su - postgres -c "pg_createcluster --start -e UTF-8 9.4 main"
sudo su - postgres -c "psql -c \"CREATE USER runner WITH PASSWORD 'semaphoredb';\" -d template1"
sudo su - postgres -c "psql -c \"ALTER USER runner CREATEUSER CREATEDB;\" -d template1"
sudo service postgresql start || true
@rastasheep
rastasheep / README.md
Last active August 29, 2015 14:12 — forked from JoelBesada/README.md

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.
@rastasheep
rastasheep / setup.sh
Last active August 29, 2015 14:11
Install and setup Go project on Semaphore
VERSION=$1
OWNER=$2
wget "https://storage.googleapis.com/golang/go$VERSION.linux-amd64.tar.gz"
sudo tar -C /usr/local -xzf "go$VERSION.linux-amd64.tar.gz"
sudo ln -s /usr/local/go/bin/go /usr/local/bin/
sudo apt-get install -y mercurial
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bash_profile
mkdir -p /home/runner/workspace/src /home/runner/workspace/bin /home/runner/workspace/pkg
echo "export GOPATH=/home/runner/workspace" >> /home/runner/.bash_profile
echo "export PATH=$PATH:/home/runner/workspace/bin" >> /home/runner/.bash_profile
@rastasheep
rastasheep / Vagrantfile
Last active August 29, 2015 14:11
vagrant push on atlas
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "opscode-ubuntu-14.04"
config.push.define "atlas" do |push|
push.app = "rastasheep/test-app"
end
end