Skip to content

Instantly share code, notes, and snippets.

@iruwl
iruwl / re-initial.md
Last active February 4, 2020 10:22
Re-initial commit in a Git repository #git
@iruwl
iruwl / CI_Base_Model.php
Last active February 4, 2020 10:20
CodeIgniter's base Model #codeigniter
<?php
/**
* An extension of CodeIgniter's base Model class to remove repetition and increase productivity by providing
* a couple handy methods(powered by CI's query builder), validation-in-model support, event callbacks and more.
*
* @author Jamie Rumbelow <http://jamierumbelow.net>
* @author Md Emran Hasan <phpfour@gmail.com>
* @author Roni Kumar Saha <roni.cse@gmail.com>
* @version 2.1
*
@iruwl
iruwl / Kutil.php
Last active February 4, 2020 10:22
Sample CodeIgniter Helper With Static Method #codeigniter
<?php
/*
* Created by irul@20150322
* Ref: http://www.paulzepernick.com/uncategorized/codeigniter-helper-with-static-method/
*
* Usage: Load this helper, call it -> Kutil::dump('aha!');
*
*/
Class Kutil {
@iruwl
iruwl / programmer_of_a_web_application.md
Last active February 4, 2020 10:19
Technical details should a programmer of a web app consider #developer

source: http://programmers.stackexchange.com/questions/46716/what-technical-details-should-a-programmer-of-a-web-application-consider-before/46760#46760

The idea here is that most of us should already know most of what is on this list. But there just might be one or two items you haven't really looked into before, don't fully understand, or maybe never even heard of.

Interface and User Experience

    Be aware that browsers implement standards inconsistently and make sure your site works reasonably well across all major browsers. At a minimum test against a recent Gecko engine (Firefox), a WebKit engine (Safari and some mobile browsers), Chrome, your supported IE browsers (take advantage of the
@iruwl
iruwl / perintah_dasar_git.md
Last active June 18, 2021 11:53
Perintah Dasar GIT #git #tutorial

Here is a list of commonly used git commands

Source : http://shabeebk.com

  • Initiate a directory as git

    git init --bare

  • Git clone

@iruwl
iruwl / crud_pemula.md
Last active February 4, 2020 10:22
Fitur Umum Sebuah CRUD yang Wajib Dikuasai Pemula #crud

Fitur Umum Sebuah CRUD yang Wajib Dikuasai Pemula

CRUD atau create, read, update, delete / destroy merupakan sebuah skema umum aplikasi yang dikembangkan oleh para software developer. CRUD biasa kita dengar di forum – forum web programming seperti grup PHP Indonesia, CodeIgniter Indonesia, Laravel PHP Indonesia, dan lain – lain. Sebenarnya dalam fitur CRUD ini ada beberapa bagian yang semestinya perlu dihafal dan tidak perlu ditanyakan lagi kepada project owner apakah fitur tersebut dibutuhkan atau tidak.

Terkadang untuk sebuah CRUD saja programmer pemula yang baru terjun di dunia kerja sering kebingungan harus menampilkan fitur apa saja dalam sebuah CRUD. Ada beberapa hal yang tidak harus ditanyakan lagi kepada atasan, dan ada beberapa yang harus didiskusikan terlebih dahulu. Oleh karena itu mari kita lihat beberapa fitur umum CRUD yang sudah tidak perlu ditanyakan lagi untuk meningkatkan efektivitas pengemban
@iruwl
iruwl / install-apache2-php5.txt
Last active February 4, 2020 10:22
Install Apache2 PHP5 on Linux #apache2 #php #linux
1. sudo apt-get install apache2
2. echo "ServerName localhost" | sudo tee /etc/apache2/conf-available/fqdn.conf
3. sudo a2enconf fqdn
4. service apache2 reload
5. sudo apt-get install php5 php5-cli libapache2-mod-php5 php5-mcrypt
6. list available php5 modules
apt-cache search php5-
7. sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
@iruwl
iruwl / bacaan.md
Last active February 4, 2020 10:18
Bacaan untuk web designer dan developer #developer #reference
@iruwl
iruwl / batch_at_will_commander.sql
Created June 7, 2016 22:46 — forked from aanari/batch_at_will_commander.sql
7 PostgreSQL data migration hacks you should be using (but aren't)
CREATE FUNCTION batch_at_will() RETURNS INTEGER LANGUAGE plpgsql AS $$
DECLARE batched_count INTEGER = 1;
BEGIN
WITH selected_users AS (
SELECT id
FROM users
WHERE role = 'moderator'
AND registration_date < CURRENT_DATE - INTERVAL '4' YEAR
LIMIT 1000
FOR UPDATE NOWAIT
@iruwl
iruwl / rest.md
Last active February 4, 2020 10:21
REST (REpresentational State Transfer) #rest #api

REST (REpresentational State Transfer)

1

REST (REpresentational State Transfer) adalah suatu arsitektur metode komunikasi yang sering diterapkan dalam pengembangan layanan berbasis web.

Arsitektur REST, yang umumnya dijalankan via HTTP (Hypertext Transfer Protocol), melibatkan proses pembacaan laman web tertentu yang memuat sebuah file XML atau JSON. File inilah yang menguraikan dan memuat konten yang hendak disajikan. Setelah melalui sebuah proses definisi tertentu, konsumen akan bisa mengakses antarmuka aplikasi yang dimaksudkan.

Kekhasan REST terletak pada interaksi antara klien dan server yang difasilitasi oleh sejumlah tipe operasional (verba) dan Universal Resource Identifiers (URIs) yang unik bagi tiap-tiap sumberdaya. Masing-masing verba – GET, POST, PUT dan DELETE – memiliki makna operasional khusus untuk menghindari ambiguitas.