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
// This is used inside of my own parseCommand(InputStream inStream, OutputStream outStream) method. | |
// The method has some other stuff included, but his is the gist of it. | |
// I changed some stuff up so that it would be more universal. | |
// | |
// This protocol uses \n as the end of a command, you can change that by changing the variable | |
// protocolEOL. | |
char protocolEOL = "\n"; | |
String inStr = ""; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Duplicate a select list using jQuery</title> | |
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> | |
<script src="selectScript.js"></script> | |
</head> | |
<body> | |
<div id="d1"> |
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
# new post | |
# setup some global things yourself... | |
timezone = "-0600" | |
layout = "default" | |
from sys import argv | |
import datetime, os | |
now = datetime.datetime.now() |
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 | |
// used to display a json file with all of the images in a directory listed as img[x].url | |
$idir = $_GET['dir']; | |
$idir = "img/$idir/*"; | |
echo "{\n"; | |
echo "\"imgs\": [\n"; | |
$ar = glob($idir); |
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 | |
$q = " | |
SELECT node.vid,node_revisions.title,node_revisions.body from node_revisions,node WHERE node_revisions.vid = node.vid and node.type = 'page' | |
"; | |
$c = mysql_connect("[host]", "[user]", "[pass]"); | |
mysql_select_db("[db name]"); | |
$r = mysql_query($q, $c); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> | |
<channel> | |
<title>{{ site.title }}</title> | |
<description>{{ site.title }}</description> | |
<link>{{ site.base_url }}</link> | |
<language>en-us</language> | |
<pubDate>{{ posts[0].timestamp|date('%a, %d %b %Y %H:%M:%S -0600') }}</pubDate> | |
<lastBuildDate>{{ none|date('%a, %d %b %Y %H:%M:%S -0600') }}</lastBuildDate> | |
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/env python2 | |
''' | |
Make Me (makeme), a custom static-site generator thingy built by | |
Don Kuntz <http://don.kuntz.co/> to generate a host of sites. | |
While the source *is* available for other people, it'll probably | |
take some tinkering to get it working for your own site. Sorry. | |
''' |
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/env python2 | |
''' | |
Make Me (makeme): refactor | |
Essentially the same thing as makeme, but refactored slightly. Because. | |
''' | |
import logging | |
import re |
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
package main | |
import ( | |
"flag" | |
"fmt" | |
//"github.com/MaximeD/gost/conf" | |
//"github.com/MaximeD/gost/gist" | |
"./gist" | |
"./conf" | |
"os" |
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
// | |
// Option One. | |
// | |
import httpserver.*; | |
public class myHandler extends HTTPHandler { | |
public myHandler() throws HTTPException { | |
addGET("/showHeaders", "showHeaders"); |