This is what I use to build my slides. I have the following goals:
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 | |
include "config.php"; | |
global $dbh; | |
function do_query($query, $params=array()) { | |
global $dbh; | |
try { | |
$stmt = $dbh->prepare($query); | |
if (empty($params)) { |
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 <sys/io.h> | |
int main() { | |
unsigned int data; | |
data = inl(0x66c); | |
prinf ("%X\n", data); | |
return 0; |
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/bash | |
if [ -z "$2" ]; then | |
echo Usage: "$0" hostname community | |
exit 4 | |
fi | |
srv="$1" | |
com="$2" | |
snmp="snmpget -v 2c -c $2 -Cf -Ov -OQ $srv" |
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/bash | |
# Do local checks and send output to nagios | |
# by maniax | |
nagioshost=nagios.ludost.net | |
hst=`hostname` | |
cd `dirname $0` || exit 3 |
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 | |
$betweenletters=0; | |
$firstline=2000000; | |
$betweentalks=10000000; | |
function spline($line) { | |
global $betweenletters; | |
for ($i=0;$i<strlen($line);$i++) { | |
echo $line[$i]; |
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/python | |
from __future__ import absolute_import, division, print_function, unicode_literals | |
""" Simple textruring of Sphere objects against a plane. The atmosphere has | |
blend set to True and so has to be drawn after object behind it to allow them | |
to show through. Normal map used for moon is just a 'normal' pictures so normals | |
are calculated strangely and create odd shadows. | |
Uses the import pi3d method to load *everything* | |
""" | |
from math import sin, cos | |
import demo |
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 | |
$offafter=15*60; | |
$loop=60; | |
$lightstatus = array(); | |
$lightstatus[0]='off'; | |
$lightstatus[1]='on'; | |
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
volatile int die=0; | |
void thread_func() { | |
while (42) { | |
do_something(); | |
do_anotherthing(); | |
if (die) { | |
close(fd); | |
return; |
OlderNewer