Skip to content

Instantly share code, notes, and snippets.

View noinarisak's full-sized avatar
🏠
Working from home

Noi Narisak noinarisak

🏠
Working from home
View GitHub Profile
@noinarisak
noinarisak / bash.sh
Last active August 29, 2015 14:07 — forked from hugocf/bash.sh
#!/usr/bin/env bash
# Created by Noi Narisak <noi.narisak@gmail.com>.
# Copyright (c) 2014. All Rights Reserved.
# Licensed under the BSD License: http://creativecommons.org/licenses/BSD
readonly BASEDIR=$(cd "$(dirname "$0")" && pwd) # where the script is located
readonly CALLDIR=$(pwd) # where it was called from
readonly STATUS_SUCCESS=0 # exit status for commands
# Script configuration
@noinarisak
noinarisak / README.md
Last active August 29, 2015 14:08 — forked from zenorocha/README.md

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

#!/bin/bash
# Add Vagrant's NFS setup commands to sudoers, for `vagrant up` without a password
# Updated to work with Vagrant 1.3.x
# Stage updated sudoers in a temporary file for syntax checking
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.
@noinarisak
noinarisak / Makefile
Last active August 29, 2015 14:15 — forked from pwenzel/Makefile
.PHONY: install
install: clean wordpress phpunit wp-cli
git submodule init;
@echo "\n\nNOTICE: You may need to configure a MySQL database for your Wordpress installation. Just run:"
@echo " mysql -u root -p;"
@echo " CREATE DATABASE example_site; \n"
wordpress: latest.tar.gz
tar -zxvf latest.tar.gz;
#!/bin/sh
# Provision help for MongoDB on C9.io.
#
# Copyright 2016 Narisak Inc.
# Written by:
# Noi Narisak <noi.narisak@gmail.com>
#
# c9.io setup script for MongoDB
# ===============================
# Thanks to: https://gist.github.com/jdbartlett/444295
# ref blog: https://marcjenkins.co.uk/a-wordpress-git-workflow/
# Ignore everything in the root except the "wp-content" directory.
/*
!.gitignore
!wp-content/
# Ignore everything in the "wp-content" directory, except the "plugins" and "themes" directories.
wp-content/*

Notes

CentOS-7 out of the box does ssh PasswordAuthenication=No, you have to update /etc/ssh/sshd_config to enable if you are not using ssh_keys with ansible.

@noinarisak
noinarisak / Vagrantfile
Created November 9, 2016 19:29
Vagrantfile + Tomcat/Maven/Java6/CVS
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.box = "centos/6"
USER=rentzsch
PASS=mypassword
REPO=mogenerator
# Delete default labels
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/bug"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/duplicate"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/enhancement"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/invalid"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/question"