Skip to content

Instantly share code, notes, and snippets.

@jokosusilo
jokosusilo / auth.php
Created February 26, 2019 07:42
codeigniter_auth
<?php
public function requestverify()
{
$this->load->library('form_validation');
$this->form_validation->set_error_delimiters('<div class="text-danger" style="text-align: left;">', '</div>');
$this->form_validation->set_rules('username', 'Username', 'required|callback_username_check');
$this->form_validation->set_rules('spacename', 'Space Name', 'required|callback_spacename_check');
@jokosusilo
jokosusilo / controller.php
Created July 25, 2018 13:21
Search Customer
public function tiket()
{
$this->load->helper('url');
$this->load->model('m_customer');
$query = $this->input->get('query');
$data = array(
'customer' => array()
);
/* Define the "system" font family */
@font-face {
font-family: system;
font-style: normal;
font-weight: 300;
src: local(".SFNSText-Light"), local(".HelveticaNeueDeskInterface-Light"), local(".LucidaGrandeUI"), local("Ubuntu Light"), local("Segoe UI Light"), local("Roboto-Light"), local("DroidSans"), local("Tahoma");
}
/* Now, let's apply it on an element */
body {
@jokosusilo
jokosusilo / process.php
Created April 26, 2017 04:21
Upload image via AJAX
<?php
// Do what you want
print_r($_POST);
/*
Gulpfile.js file for the tutorial:
Using Gulp, SASS and Browser-Sync for your front end web development - DESIGNfromWITHIN
http://designfromwithin.com/blog/gulp-sass-browser-sync-front-end-dev
Steps:
1. Install gulp globally:
npm install --global gulp
@jokosusilo
jokosusilo / gist:bef7ac4516fd00036e39
Created September 21, 2015 15:36
Create Composer
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
@jokosusilo
jokosusilo / Kabupaten_Model.php
Created June 4, 2015 01:35
Pagination di Codeigniter 3
<?php
class Kabupaten_Model extends CI_Model{
public function __construct(){
parent:: __construct();
}
// Pagination biasa
public function countAll(){
return $this->db->count_all('kabupaten');
@jokosusilo
jokosusilo / optimize website
Created April 28, 2015 04:28
Beberapa hal yang bisa dilakukan untuk mempercepat loading dan optimaliasi website
minification of files
zipping css / js files
pulling all css files into one
pulling all js files into one
creating image sprites that combined many images into one big sprite
avoid using IE specific css expressions
using a cdn to serve files
loading js at bottom of page
serving files from a different domain
serving files asynchronously after page has loaded
@jokosusilo
jokosusilo / optimize website
Created April 28, 2015 04:28
Beberapa hal yang bisa dilakukan untuk mempercepat loading dan optimaliasi website
minification of files
zipping css / js files
pulling all css files into one
pulling all js files into one
creating image sprites that combined many images into one big sprite
avoid using IE specific css expressions
using a cdn to serve files
loading js at bottom of page
serving files from a different domain
serving files asynchronously after page has loaded
@jokosusilo
jokosusilo / webdeveloper
Last active August 29, 2015 14:20
Requirement web developer
Auth
-simple (Access Control List)
-advanced (Role Based Access Control)
-hand made Authentication
Caching
-DB Caching
-File Caching
-Mem Caching
-Image Caching