Skip to content

Instantly share code, notes, and snippets.

View ngangchill's full-sized avatar

Night Fury ngangchill

View GitHub Profile
@ngangchill
ngangchill / LICENCE SUBLIME TEXT
Created July 15, 2018 15:17
Sublime Text 3 Serial key build is 3176
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@ngangchill
ngangchill / Email Server (Windows Only).md
Created July 1, 2018 19:55 — forked from raelgc/Email Server (Windows Only).md
Setup a Local Only Email Server (Windows Only)
@ngangchill
ngangchill / dump_helper.php
Created December 10, 2016 19:55 — forked from accentinteractive/dump_helper.php
dump_helper: functions to dump variables to the screen, in a nicley formatted manner
<?php
/**
* Dump helper. Functions to dump variables to the screen, in a nicley formatted manner.
* @author Joost van Veen
* @version 1.0
*/
if (!function_exists('dump')) {
function dump ($var, $label = 'Dump', $echo = TRUE)
{
// Store dump in variable
@ngangchill
ngangchill / README.md
Last active September 5, 2015 04:26 — forked from pporlan/README.md

Checkbox Helper

Just a tiny helper to help with checkboxes. When you uncheck a checkbox, it's value does not get sent in the form values. Instead of telling CodeIgniter you want to set this value to 0, it says "don't change it." This fixes that, one by one, by setting the value of the associated $_POST array item to zero. You can also pass in an array of checkbox names and it will do each one.

Usage

$this->load->helper('checkbox');

// set post values to zero for unchecked boxes
fix_unchecked(['is_active', 'is_enabled', 'is_verified']);
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Upload extends CI_Upload {
public $destination_not_file_system = FALSE;
public function __construct($props = array())
{
parent::__construct();