This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* Terbilang Helper | |
* | |
* @package CodeIgniter | |
* @subpackage Helpers | |
* @category Helpers | |
* @author Gede Lumbung | |
* @link http://gedelumbung.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media (min-width: 768px) {} | |
@media (min-width: 992px) {} | |
@media (min-width: 1200px) {} | |
@media screen and (max-width: 767px) {} | |
@media screen and (min-width: 768px) {} | |
@media screen and (-webkit-min-device-pixel-ratio: 0) {} | |
@media (max-device-width: 480px) and (orientation: landscape) {} | |
@media (max-width: 767px) {} | |
@media all and (transform-3d), (-webkit-transform-3d) {} | |
@media (min-width: 768px) and (max-width: 991px) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
/** | |
* Demo Styles | |
*/ | |
html { | |
height: 100%; /* <-- this is it --> */ | |
box-sizing: border-box; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($){ | |
function getTime(){ | |
var text=""; | |
var d=new Date(); | |
var days=['Minggu','Senin','Selasa','Rabu','Kamis','Jum\'at','Sabtu']; | |
text +=days[d.getDay()]; | |
var tanggal=d.getDate(); | |
text +=', '+tanggal; | |
var bulan=['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli','Agustus', 'September', 'Oktober', 'Nopember', 'Desember']; | |
text +=' '+bulan[d.getMonth()]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function random_color_1(){ | |
$rand = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'); | |
return '#'.$rand[rand(0,15)].$rand[rand(0,15)].$rand[rand(0,15)].$rand[rand(0,15)].$rand[rand(0,15)].$rand[rand(0,15)]; | |
} | |
function random_color_3(){ | |
return '#'.strtoupper(dechex(rand(0,10000000))); | |
} | |
function random_color_2(){ | |
$spread = 25; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
Options +FollowSymlinks | |
RewriteEngine On | |
RewriteBase / | |
</IfModule> | |
<IfModule mod_rewrite.c> | |
RewriteCond %{HTTPS} !=on | |
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] | |
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template lang="html"> | |
<div id="editor"> | |
<quill-editor | |
class="editor-example" | |
ref="myQuillEditor" | |
:content="content" | |
:options="editorOption" | |
@change="onEditorChange($event)"> | |
</quill-editor> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM `table` WHERE email REGEXP '^[A-Za-z0-9._%\-+!#$&/=?^|~]+@[A-Za-z0-9.-]+[.][A-Za-z]+$'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function post_image_first($post){ | |
$first_img = ''; | |
ob_start(); | |
ob_end_clean(); | |
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches); | |
if(isset($matches[1][0])){ | |
$first_img = $matches[1][0]; | |
if(empty($first_img)){ | |
//Defines a default image | |
$first_img = false; |