Skip to content

Instantly share code, notes, and snippets.

Avatar

Idham Hafidz Ismail (Apit John Kedekut) idhamhafidz

View GitHub Profile
View malaysia_postcode_list.json
{
"prepared_by": "Zulhilmi Zainudin",
"last_update": "21 June 2016",
"data": [
{
"state": "Selangor",
"codes": [
"40000",
"40100",
@idhamhafidz
idhamhafidz / DbmigrateController.php
Created Jun 29, 2016 — 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…
View DbmigrateController.php
<?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 / remgit.sh
Created Jan 6, 2016 — forked from ckalima/remgit.sh
Shell Script to Create a Remote Git Repository
View remgit.sh
# 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 / push-gh-pages.sh
Created Jan 6, 2016 — forked from motemen/push-gh-pages.sh
Shell script to setup/push GitHub pages
View push-gh-pages.sh
#!/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 / wp.sh
Created Dec 31, 2015 — 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!
View wp.sh
#!/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: "
View 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 / Install automysqlbackup.md
Created Oct 8, 2015 — forked from janikvonrotz/Install automysqlbackup.md
Ubuntu: Install automysqlbackup #MySQL #Markdown
View Install automysqlbackup.md

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