Skip to content

Instantly share code, notes, and snippets.

View larsks's full-sized avatar

Lars Kellogg-Stedman larsks

View GitHub Profile
This is a test.
<html>
<head>
<title>Document Title</title>
</head>
</html>
#include <libssh2.h>
#include <unistd.h>
#include <stdarg.h>
#include <string.h>
#include <netdb.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
diff -ruN xdv/lib/xdv/annotate-rules.xsl xdv.lars/lib/xdv/annotate-rules.xsl
--- xdv/lib/xdv/annotate-rules.xsl 2010-07-12 14:05:08.000000000 -0400
+++ xdv.lars/lib/xdv/annotate-rules.xsl 2010-07-12 17:18:22.000000000 -0400
@@ -106,11 +106,11 @@
* When using ssiprefix, @href should be an absolute local path (i.e. /foo/bar)
-->
<xsl:variable name="content_quoted" select="str:encode-uri(@content, false())"/>
- <xsl:element name="xsl:comment"># include virtual="<xsl:value-of select="$ssiprefix"/><xsl:choose>
+ <xsl:element name="xsl:comment">#include virtual="<xsl:value-of select="$ssiprefix"/><xsl:choose>
<xsl:when test="not(@content)"><xsl:value-of select="@href"/></xsl:when>
diff --git a/src/hci/commands/dhcp_cmd.c b/src/hci/commands/dhcp_cmd.c
index 96aac8d..a494068 100644
--- a/src/hci/commands/dhcp_cmd.c
+++ b/src/hci/commands/dhcp_cmd.c
@@ -31,6 +31,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <gpxe/in.h>
#include <gpxe/command.h>
#include <usr/dhcpmgmt.h>
+#include <usr/ifmgmt.h>
@larsks
larsks / gist:706824
Created November 19, 2010 17:27
An example virtual host
<VirtualHost *:443>
ServerName www.example.com
ServerAlias www
DocumentRoot /var/www/sites/www/example.com/html
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/WILDCARD.example.com.crt
SSLCertificateKeyFile /etc/pki/tls/private/WILDCARD.example.com.key
SSLCertificateChainFile /etc/pki/tls/certs/geotrust-ssl-chain.crt
@larsks
larsks / gist:732500
Created December 7, 2010 21:58
slimserver state when scanning (new and changed only)
mysql> select * from metainformation where name = "isScanning";
+------------+----------------------+
| name | value |
+------------+----------------------+
| isScanning | SETUP_STANDARDRESCAN |
+------------+----------------------+
1 row in set (0.00 sec)
mysql> select * from progress;
+----+----------+--------+--------+-------+------+------------+--------+------+
@larsks
larsks / gist:864290
Created March 10, 2011 15:39
Heuristics for determining internet address of a node from the nodelist.
def inet(self, for_flag=None):
'''Attempt to return the IP address or hostname for this
node. If you specify for_flag, look for a service specific address
first. Returns address or address:port if successful; returns None
if unable to determine an address from the nodelist.'''
ip = None
port = None
for flag in self.flags:
#!/bin/bash
pkg=$(basename $(pwd))
tag=HEAD
while getopts 'n:t:' ch; do
case $ch in
(n) pkg=$OPTARG;;
(t) tag=$OPTARG;;
esac