Skip to content

Instantly share code, notes, and snippets.

/*
* LedBrightness sketch
* controls the brightness of LEDs on "analog" (PWM) output ports.
*/
class rgb_color {
private:
int my_r;
int my_g;
<?php
$cacheFile = 'cache/cache.html';
$cacheTime = 4 * 60;
// Serve the cached file if it is older than $cacheTime
if (file_exists($cacheFile) && time() - $cacheTime < filemtime($cacheFile)) {
include($cacheFile);
exit;
}
// Start the output buffer
@deplorableword
deplorableword / gist:74900
Created March 6, 2009 13:00
conditional comments
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="ie6.v1.css" media="screen" />
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="ie7.v1.css" media="screen" />
<![endif]-->
<?php
/*
Get photos from a flickr pool and make a cache,
html output is setup ready for lightbox plugin coolness
tom@substrakt.co.uk
*/
$cacheFile = 'flickrcache.html';
$cacheTime = 4 * 60;
// Serve the cached file if it is older than $cacheTime
<?php
// grab everything tagged bsmc and show it nicely
include_once(ABSPATH . WPINC . '/rss.php');
$rss = fetch_rss('http://upcoming.yahoo.com/syndicate/v2/tag/bsmc');
// set the timezone to GMT
date_default_timezone_set('Europe/London');
foreach ($rss->items as $item) {
// nuke -1 hour, cos daylight saving isn't right
$time = strtotime("-1 hours", strtotime($item['xcal']['dtstart']));
<?
require('wp-includes/registration.php');
$test = array ('ID' => $current_user->ID, 'user_pass' => 'cheese');
wp_update_user ($test);
?>
var snd:MySound1= new MySound1();
soundbutton_MC.addEventListener (MouseEvent.CLICK, soundbutton_Handler);
function soundbutton_Handler (e:MouseEvent):void {
snd.play();
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>jquery form element disable</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
AddHandler application/x-httpd-php .css
php_value auto_prepend_file gzip-css.php
php_flag zlib.output_compression On
<?php
/**
* LICENSE
* -------------------
* Copyright (c) 2007-2008, Kaiser Shahid <knitcore@yahoo.com>
* All rights reserved.
*
* This software is licensed under the BSD License:
*
* Redistribution and use in source and binary forms, with or without