Skip to content

Instantly share code, notes, and snippets.

View Vheissu's full-sized avatar
💭
SURFING THE INTERNET

Dwayne Charrington Vheissu

💭
SURFING THE INTERNET
View GitHub Profile
@Aeon
Aeon / 960gs.less
Created March 1, 2010 07:41 — forked from Artanis/960gs.less
LessCSS and 960gs don't play well together normally. Here's the definitions for 960gs to let LessCSS work with it. Looks like we can pull all grid data out of the HTML.
/**
* A LessCSS version of the 960 Grid System
*
* http://lesscss.org/
* http://960.gs/
*/
/*********************************************************************
* Settings *
*********************************************************************/
@paulirish
paulirish / gist:366184
Created April 14, 2010 18:59
html5 geolocation with fallback.
// geo-location shim
// currentely only serves lat/long
// depends on jQuery
// doublecheck the ClientLocation results because it may returning null results
;(function(geolocation){
if (geolocation) return;
@cowboy
cowboy / HEY-YOU.md
Last active May 16, 2024 13:31
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
@tobsn
tobsn / pastebin.class.php
Created May 29, 2011 09:04
pastebin scraper
<?php
class pastebin {
private $folder = './pastebins';
public $pastes = array();
function __construct( $folder = false ) {
if( $folder ) {
$this->folder = $folder;
}
$this->folder = rtrim( $this->folder, '/' );
@rileydutton
rileydutton / scraper.php
Created June 13, 2011 22:51
Website Scraper
<?php
include 'phpQuery-onefile.php';
$file = 'http://www.usbr.gov/lc/region/g4000/riverdata/gage-month-table.cfm?GAGE=3'; // see below for source
// loads the file
// basically think of your php script as a regular HTML page running client side with jQuery. This loads whatever file you want to be the current page
phpQuery::newDocumentFileHTML($file);
@crofty
crofty / index.html
Last active October 22, 2021 08:24
A example of using Google Map tiles with the Leaflet mapping library - http://matchingnotes.com/using-google-map-tiles-with-leaflet
<!DOCTYPE html>
<html>
<head>
<title>Leaflet</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.js"></script>
<script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>
<script src="http://matchingnotes.com/javascripts/leaflet-google.js"></script>
</head>
<body>
@utsengar
utsengar / Sync_Async_loading_handlebars.js
Created April 2, 2012 20:41
synchronous and asynchronous loading of handlebars templates
/*
* This decorates Handlebars.js with the ability to load
* templates from an external source, with light caching.
*
* To render a template, pass a closure that will receive the
* template as a function parameter, eg,
* T.render('templateName', function(t) {
* $('#somediv').html( t() );
* });
* Source: https://github.com/wycats/handlebars.js/issues/82
@Abban
Abban / WordPress Theme Customizer Sample.php
Created June 21, 2012 21:09
WordPress Theme Customizer Sample
<?php
function themename_customize_register($wp_customize){
$wp_customize->add_section('themename_color_scheme', array(
'title' => __('Color Scheme', 'themename'),
'priority' => 120,
));
// =============================
@nickyleach
nickyleach / Lock.php
Created September 10, 2012 22:54
Simple redis-backed Mutex
<?
class Lock {
const TIMEOUT = 20;
const SLEEP = 100000;
/**
* Stores the expire time of the currently held lock
* @var int
@michaelaguiar
michaelaguiar / GoogleScrape.class.php
Created September 11, 2012 22:04
Google Result Scraper
<?php
require_once('simple_html_dom.php');
class Google_Scrape
{
private $html = null;
private $query = null;
private $results = 0;
public function __construct($query='sample', $results=20)