Skip to content

Instantly share code, notes, and snippets.

View idhamhafidz's full-sized avatar

Idham Hafidz Ismail (Apit John Kedekut) idhamhafidz

View GitHub Profile
@idhamhafidz
idhamhafidz / Install automysqlbackup.md
Created October 8, 2015 04:57 — forked from janikvonrotz/Install automysqlbackup.md
Ubuntu: Install automysqlbackup #MySQL #Markdown

Introduction

AutoMySQLBackup with a basic configuration will create Daily, Weekly and Monthly backups of one or more of your MySQL databases from one or more of your MySQL servers.

Requirements

  • Ubuntu server
  • MySQL

Installation

@idhamhafidz
idhamhafidz / wp.sh
Created December 31, 2015 15:34 — forked from phlbnks/wp.sh
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Do you need to setup new MySQL database? (y/n)"
read -e setupmysql
if [ "$setupmysql" == y ] ; then
echo "MySQL Admin User: "
read -e mysqluser
@idhamhafidz
idhamhafidz / wp.sh
Created December 31, 2015 15:34 — forked from bgallagh3r/wp.sh
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
@idhamhafidz
idhamhafidz / push-gh-pages.sh
Created January 6, 2016 17:20 — forked from motemen/push-gh-pages.sh
Shell script to setup/push GitHub pages
#!/bin/sh
# usage: push-gh-pages DIRECTORY # DIRECTORY is where GitHub pages contents are in (eg. build)
set -e
remote=$(git config remote.origin.url)
described_rev=$(git rev-parse HEAD | git name-rev --stdin)
pages_dir="$1"
@idhamhafidz
idhamhafidz / remgit.sh
Created January 6, 2016 17:21 — forked from ckalima/remgit.sh
Shell Script to Create a Remote Git Repository
# remgit.sh
# Creates a remote git repository from the current local directory
# Configuration
# Replace SSH_USERNAME, SSH_HOST, SSH_GIT_PATH with your details
USER=SSH_USERNAME
HOST=SSH_HOST
GIT_PATH=SSH_GIT_PATH
REPO=${PWD##*/}
@idhamhafidz
idhamhafidz / DbmigrateController.php
Created June 29, 2016 03:07 — forked from bruceoutdoors/DbmigrateController.php
Laravel 4 Convert existing MySQL database to migrations. This is a fork of Christopher Pitt's work http://laravelsnippets.com/snippets/convert-an-existing-mysql-database-to-migrations, which is based off michaeljcalkins's work at http://paste.laravel.com/1jdw#sthash.0nEgQzQR.dpuf. His original source code doesn't really work out of the box in my…
<?php
/* * **
*
* This script converts an existing MySQL database to migrations in Laravel 4.
*
* 1. Place this file inside app/controllers/
*
* 2. In this file, edit the index() method to customize this script to your needs.
* - inside $migrate->ignore(), you pass in an array of table
@idhamhafidz
idhamhafidz / malaysia_postcode_list.json
Created August 12, 2017 05:48 — forked from zulhfreelancer/malaysia_postcode_list.json
Malaysia Postcode List By State (JSON)
{
"prepared_by": "Zulhilmi Zainudin",
"last_update": "21 June 2016",
"data": [
{
"state": "Selangor",
"codes": [
"40000",
"40100",