Skip to content

Instantly share code, notes, and snippets.

View abenevaut's full-sized avatar
💬
BiBop! I'm EngelBit!

Antoine B. abenevaut

💬
BiBop! I'm EngelBit!
View GitHub Profile
@zmsaunders
zmsaunders / filters.php
Last active August 7, 2022 10:54
HTML Output Minification in laravel 4
<?php
### --- Snip --- ###
App::after(function($request, $response)
{
// HTML Minification
if(App::Environment() != 'local')
{
if($response instanceof Illuminate\Http\Response)
@scottymac
scottymac / gist:1810536
Created February 12, 2012 20:01
Custom validators for jQuery Tools
// custom validators
// generic validator for required input fields to work with validator() & [placeholder]
$.tools.validator.fn("input[required]", "Please complete this mandatory field.", function(input, value) {
var pass;
if ((value == "") || (value == $(input).attr("placeholder"))) {
$(input).addClass("invalid");
pass = false;
} else {
$(input).removeClass("invalid");
@dodyw
dodyw / geocode.php
Created January 14, 2012 10:20
geocode with google api v3
<?php
$address = "Sutorejo Utara, Surabaya, Indonesia";
$address = urlencode($address);
$url = "http://maps.googleapis.com/maps/api/geocode/json?address=$address&sensor=false";
$raw = file_get_contents($url);
$data = json_decode($raw);
$lat = $data->results[0]->geometry->location->lat;
$lng = $data->results[0]->geometry->location->lng;
@thinkphp
thinkphp / gist:1448754
Created December 8, 2011 21:44
Binary Search Tree Implementation in PHP
<?php
/**
* by Adrian Statescu <[email protected]>
* Twitter: @thinkphp
* G+ : http://gplus.to/thinkphp
* MIT Style License
*/