Skip to content

Instantly share code, notes, and snippets.

View zmiftah's full-sized avatar
💭
Waiting List ...

Zein Miftah zmiftah

💭
Waiting List ...
  • West Java, Indonesia
View GitHub Profile
@zmiftah
zmiftah / css_border_radius.css
Created July 30, 2012 03:22
CSS : Border Radius
-moz-border-radius: 5px; /* Firefox */
-webkit-border-radius: 5px; /* Safari and Chrome */
border-radius: 5px; /* Opera 10.5+, future browsers, and now also Internet Explorer 6+ using IE-CSS3 */
@zmiftah
zmiftah / css_box_shadow.css
Created July 30, 2012 03:23
CSS : Box Shadow
-moz-box-shadow: 0 3px 8px 6px rgba(64, 87, 115, 0.5); /* Firefox */
-webkit-box-shadow: 0 3px 8px 6px rgba(64, 87, 115, 0.5); /* Safari and Chrome */
box-shadow: 0 3px 8px 6px rgba(64, 87, 115, 0.5); /* Opera 10.5+, future browsers, and now also Internet Explorer 6+ using IE-CSS3 */
@zmiftah
zmiftah / css_dinamic_div_height.css
Created August 8, 2012 06:58
CSS: Dynamic Div Height
width: 100%; overflow: hidden;
@zmiftah
zmiftah / jquery_disable_contextmenu.js
Created September 2, 2012 11:27
jQuery: Disable ContextMenu
$(document).ready(function()
{
$(document).bind("contextmenu",function(e){
return false;
});
});
@zmiftah
zmiftah / php_ereg_function_in_53.php
Created September 12, 2012 09:45
PHP: ereg function Deprecated
<?php
//
// Source: http://www.devthought.com/2009/06/09/fix-ereg-is-deprecated-errors-in-php-53/
//
// To migrate ereg():
ereg('\.([^\.]*$)', $this->file_src_name, $extension);
// becomes
preg_match('/\.([^\.]*$)/', $this->file_src_name, $extension);
@zmiftah
zmiftah / mysql_date_format.txt
Last active October 11, 2015 05:27
Mysql: MySQL DATE_FORMAT() explained
MySQL DATE_FORMAT() Letter Representations
Specifier Description
%a Abbreviated weekday name (Sun..Sat)
%b Abbreviated month name (Jan..Dec)
%c Month, numeric (0..12)
%D Day of the month with English suffix (0th, 1st, 2nd, 3rd, …)
%d Day of the month, numeric (00..31)
%e Day of the month, numeric (0..31)
%f Microseconds (000000..999999)
%H Hour (00..23)
@zmiftah
zmiftah / jquery_html_protector.js
Last active October 11, 2015 05:28
jQuery: HTML Protector
//
// From Googling, update: 2012-10-01
//
var disableContextMenu = function(){
return this.each(function(){
$(this).bind('contextmenu', function(){return false})
$(this).mousedown(function(){return false})
$(this).click(function(){return true})
@zmiftah
zmiftah / php_db_logger.php
Last active October 11, 2015 05:28
PHP: Db (Mysql) Logger Class
<?php
class DbLogger {
private $table_name;
private $db;
private $queries;
private $errors;
private $result;
private $safe;
@zmiftah
zmiftah / class_paginator_v1.php
Last active October 12, 2015 08:28
PHP: Simple Class Paginator v0.1
<?php
class Paginator {
var $per_page;
var $total;
var $list;
var $period;
public function __construct( $per_page, $total ) {
$this->per_page = $per_page;
$this->total = $total;
@zmiftah
zmiftah / angular_controller.js
Last active December 10, 2015 22:08 — forked from zergin/controller.js
JS: Angular Controller
$scope.$on('$viewContentLoaded', function() {
$scope._style = document.createElement('link');
$scope._style.type = 'text/css';
$scope._style.href = 'application/Invoice/Resource/single.css';
$scope._style.rel = 'stylesheet';
$scope._style = document.head.appendChild($scope._style);
});
$scope.$on('$destroy', function() {