Skip to content

Instantly share code, notes, and snippets.

@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
/*
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 / process.php
Created April 26, 2017 04:21
Upload image via AJAX
<?php
// Do what you want
print_r($_POST);
/* 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 / 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()
);
@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');