Skip to content

Instantly share code, notes, and snippets.

View shearluck's full-sized avatar

Noel Jarencio shearluck

  • Philippines
View GitHub Profile

Install Apache/PHP 5.5.9 on Fedora 20/19, CentOS/RHEL 6.5/5.10

This guide shows howto install Apache HTTP Server (httpd) with PHP 5.5.9 and following modules on Fedora 20/19/18/17, CentOS 6.5/6.4/6.3/6.2/6.1/6/5.10 and Red Hat (RHEL) 6.5/6.4/6.3/6.2/6.1/6/5.10 systems.

  1. Change root user

su -
## OR ##

sudo -i

@shearluck
shearluck / post-receive
Last active August 29, 2015 14:06
Git post-receive script - checkout based on currently pushed local branch
#!/bin/bash
while read oldrev newrev ref
do
branch=`echo $ref`
echo "Pushing to branch $branch"
done
git --work-tree=/path/to/deploy/files --git-dir=/path/of/baregit.git checkout $branch -f
echo "All done!"
@shearluck
shearluck / git-branching-model.txt
Last active August 29, 2015 14:06
Successful Git branching model
// Development branch
git branch develop
// Development branch supporting branches
git branch feature-* // may branch off from develop, must merge back to develop
git branch release-* // may branch off from develop, must merge back to develop or master
git branch hotfix-* // branch off from master, must merge back to master and develop
// Merging branch that will retain branching history and metadata
git merge --no-ff branchname
@shearluck
shearluck / README.md
Last active August 29, 2015 14:06 — forked from jxson/README.md

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@shearluck
shearluck / shell-loop.sh
Last active August 29, 2015 14:11
Run shell command n times
for i in {1..5}; do curl 'https://www.google.com'; done
@shearluck
shearluck / .tmux.conf
Last active October 19, 2019 04:18
Tmux config
# S.R TMUX conf
# set = set option
# setw = set window option
# bind -r = allow recursive press after prefix
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'srathbone/tmux-online-status'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
@shearluck
shearluck / vimrc
Last active October 19, 2019 04:18
My vimrc config
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
@shearluck
shearluck / docker-playbook.yml
Last active October 16, 2015 10:07
Sample ansible playbook for managing docker container
# Run with:
# ansible-playbook docker-playbook.yml
- hosts: 127.0.0.1
sudo: yes # If in use, add parameter: --ask-sudo-pass
tasks:
- name: Install docker-py
pip: name=docker-py # Install dependency
- name: run docker app container
docker:
@shearluck
shearluck / ruby-docker-app
Created October 16, 2015 10:08
Sample ruby docker app
FROM ruby:2.2.3
RUN bundle config --global frozen 1
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY app.rb /usr/src/app/
COPY Gemfile /usr/src/app/
COPY Gemfile.lock /usr/src/app/
FROM django:1.9-python3
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY requirements.txt /usr/src/app/
RUN pip install --no-cache-dir -r requirements.txt
COPY . /usr/src/app