This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
function usage() { | |
echo "Usage: " . $_SERVER['argv'][0] . " [-v] URL\n"; | |
echo "\nPretty-prints JSON output from a URL."; | |
echo "\n\t-v\tDecode JSON and use var_dump to display result\n"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$width = $height = 1000; | |
if (isset($_GET['width'])) { | |
$width = (int) $_GET['width']; | |
} | |
if (isset($_GET['height'])) { | |
$height = (int) $_GET['height']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$str = "This | |
is | |
a | |
multi | |
line | |
string"; | |
var_dump($str); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Mesh pattern demo - requires Cairo 1.12 | |
* Compile with: | |
* gcc -I/usr/include/cairo -o mesh_pattern mesh_pattern.c -lcairo | |
* (or similar) | |
* | |
* Running will create 'mesh.png' in the current directory | |
* Michael Maclean <[email protected]> | |
*/ | |
#include <cairo.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _GNU_SOURCE | |
#include <dirent.h> /* Defines DT_* constants */ | |
#include <fcntl.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <sys/stat.h> | |
#include <sys/syscall.h> | |
#define handle_error(msg) \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define LCD_ALIAS_REAL "DS18B20.28b8c81d300e5.Temp,DS18B20.2816401d3005f.Temp,DS18B20.28ac871d300e4.Temp" | |
#define LCD_ALIAS_ALIAS "Front_air_intake,Bottom_hose_temp,Top_hose_temp" | |
int main() { | |
char **devices; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuring for: | |
PHP Api Version: 20090626 | |
Zend Module Api No: 20090626 | |
Zend Extension Api No: 220090626 | |
rebuilding aclocal.m4 | |
rebuilding configure | |
configure.in:150: warning: LTOPTIONS_VERSION is m4_require'd but not m4_defun'd | |
aclocal.m4:2955: LT_INIT is expanded from... | |
aclocal.m4:2993: AC_PROG_LIBTOOL is expanded from... | |
configure.in:150: the top level |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('BOX_WIDTH', 45); | |
define('BOX_MARGIN', 5); | |
$image = imagecreatefromjpeg('callanish.jpg'); | |
$width = imagesx($image); | |
$height = imagesy($image); | |
$s = new CairoImageSurface(CairoFormat::ARGB32, $width, $height); | |
$c = new CairoContext($s); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ZSHA_BASE=$HOME/.zsh-antigen | |
source $ZSHA_BASE/antigen/antigen.zsh | |
antigen-use oh-my-zsh | |
antigen-bundle git | |
if [ "$OSTYPE"="darwin11.0" ]; then | |
antigen-bundle osx | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Fire up terminal-notifier.app without needing a Ruby wrapper | |
# Stolen from the `mvim` script distributed with MacVim. | |
# | |
# Credits for the MacVim version are: | |
# Based on a script by Wout Mertens and suggestions from Laurent Bihanic. This | |
# version is the fault of Benji Fisher, 16 May 2005 (with modifications by Nico | |
# Weber and Bjorn Winckler, Aug 13 2007). | |
# |
OlderNewer