Skip to content

Instantly share code, notes, and snippets.

View purwandi's full-sized avatar
🏠
Working from home

purwandi purwandi

🏠
Working from home
View GitHub Profile
@purwandi
purwandi / README.markdown
Created September 5, 2012 08:09 — forked from gudbergur/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string
@purwandi
purwandi / gist:3550649
Created August 31, 2012 09:16 — forked from saetia/gist:1623487
Clean Install – Mountain Lion OS X 10.8
// start click full screen
btnMulai.click(function(){
// go request full screen
content.fullScreen({
'background' : '#FFF',
'callback' : function(fullScreen){
// if not full screen mode
if ( ! fullScreen) {
@purwandi
purwandi / countdown.html
Created July 17, 2012 09:47
Countdown HTML Test
<!DOCTYPE html>
<html>
<head>
<style style="text/css">
.lcdstyle{ /*Example CSS to create LCD countdown look*/
background-color:black;
color:yellow;
font: bold 18px MS Sans Serif;
padding: 3px;
@purwandi
purwandi / base.php
Created June 15, 2012 02:14
My Base Model for Laravel
<?php
/**
* Base Model
*
* @package Extends Model Laravel
* @version 1.0
* @author Purwandi <[email protected]>
* @link http://purwand.me
*/
class Base extends Eloquent{
<?php
/**
* Remove html tag
*
* @access public
* @param string
* @return string
*/
function strip_html_tags($text)
/* http://giusi.org/bootstrap-media/media.html */
.media, .media-body {
overflow:hidden;
*overflow:visible;
zoom:1;
}
.media {
margin-bottom: 10px;
}
@purwandi
purwandi / curl_sample
Created January 28, 2012 10:46
How to get content on html
<?php
/*$target = 'http://bni.co.id/id-id/informasivalas.aspx';
$ch = curl_init ($target);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$st = curl_exec ($ch) or die ('Curl Gagal');
curl_close($ch);
$p1 = strpos($st, "<td>USD</td><td class=\"number\">");