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 | |
CERT_NAME="dev_cert" | |
TOP_DEV_DOMAIN="example.dev" | |
DOMAINS=( | |
"DNS:$TOP_DEV_DOMAIN" | |
"DNS:*.$TOP_DEV_DOMAIN" | |
"DNS:*.level2.$TOP_DEV_DOMAIN" | |
"DNS:*.level3.level2.$TOP_DEV_DOMAIN" | |
) |
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 ( | |
"fmt" | |
"net/http" | |
"time" | |
) | |
func handler(w http.ResponseWriter, r *http.Request) { | |
fmt.Fprintf(w, "URL:%s, TIME:%s", r.URL.Path[1:], time.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 | |
/** | |
* Class for running a script as daemon in Linux. The script is started | |
* in the background by itself, to stop the daemon use filename.xphp --stop. | |
* | |
* $d = new Library_Cmd_Daemon('daemon.pid'); | |
* $d->run(function() { | |
* while(1) { | |
* sleep(10); |
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
{ | |
"alt-speed-down": 50, | |
"alt-speed-enabled": false, | |
"alt-speed-time-begin": 540, | |
"alt-speed-time-day": 127, | |
"alt-speed-time-enabled": false, | |
"alt-speed-time-end": 1020, | |
"alt-speed-up": 50, | |
"bind-address-ipv4": "0.0.0.0", | |
"bind-address-ipv6": "::", |
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 php | |
<?php | |
/** | |
* Script for importing timezone information from PHP into MySQL. | |
* Modified from the example in php|architect’s Guide to Date and | |
* Time Programming by Derick Rethans. | |
* Works by gathering information before removing the existing information | |
* from the MySQL tables. | |
* The gathering process takes ~17 sec. and the inserting takes only ~0.6 sec. |