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 / 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\">");
/* http://giusi.org/bootstrap-media/media.html */
.media, .media-body {
overflow:hidden;
*overflow:visible;
zoom:1;
}
.media {
margin-bottom: 10px;
}
<?php
/**
* Remove html tag
*
* @access public
* @param string
* @return string
*/
function strip_html_tags($text)
@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 <free6300@gmail.com>
* @link http://purwand.me
*/
class Base extends Eloquent{
@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;
// 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 / gist:3550649
Created August 31, 2012 09:16 — forked from saetia/gist:1623487
Clean Install – Mountain Lion OS X 10.8
@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 / remote-typeahead.js
Created September 6, 2012 02:35 — forked from geuis/remote-typeahead.js
Remote data querying for Twitter Bootstrap 2.0 Typeahead without modifications
<script>
// Charles Lawrence - Feb 16, 2012. Free to use and modify. Please attribute back to @geuis if you find this useful
// Twitter Bootstrap Typeahead doesn't support remote data querying. This is an expected feature in the future. In the meantime, others have submitted patches to the core bootstrap component that allow it.
// The following will allow remote autocompletes *without* modifying any officially released core code.
// If others find ways to improve this, please share.
var autocomplete = $('#searchinput').typeahead()
.on('keyup', function(ev){
ev.stopPropagation();
@purwandi
purwandi / composer.json
Created September 21, 2012 07:11 — forked from philsturgeon/composer.json
PHP Image Manipulation
{
"require": {
"illuminate/foundation": ">=1.0.0",
"illuminate/auth": ">=1.0.0",
"illuminate/database": ">=1.0.0",
"illuminate/view": ">=1.0.0",
"amazonwebservices/aws-sdk-for-php": "1.5.*",
"codeguy/upload": "*",
"sybio/image-workshop" : "*",