This file contains hidden or 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> | |
#include <stdint.h> | |
#include <unistd.h> | |
#if (__APPLE__) || (USE_DARWIN) | |
#include <libkern/OSByteOrder.h> | |
#define htobe64(x) OSSwapHostToBigInt64(x) | |
#else |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
import os | |
import time | |
import signal | |
import pwd | |
_DEFAULT_ENV = {"PATH": "/sbin:/usr/sbin:/bin:/usr/bin", "LANG": "en_US.UTF-8"} |
This file contains hidden or 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 | |
# /etc/init.d/redmine2 | |
### BEGIN INIT INFO | |
# Provides: redmine2 | |
# Required-Start: $remote_fs $syslog $named $network $time mysql | |
# Required-Stop: $remote_fs $syslog $named $network mysql | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Redmine Issue Tracker |
This file contains hidden or 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 python | |
# based on the unit2.py from unittest2 | |
# {{{ automatically attach options for discover | |
import sys | |
if (1 == len(sys.argv)) or ( (2 == len(sys.argv)) and (sys.argv[1] in ("-v", "--verbose",)) ): | |
extra_arg = None | |
if 2 == len(sys.argv): |
This file contains hidden or 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 | |
header('Content-Type: application/json'); | |
$callback = trim($_GET['callback']); | |
if(!empty($callback)) | |
{ echo $callback, '('; } | |
echo '{"status": 0, "tstamp": ', time(), '}'; | |
if(!empty($callback)) | |
{ echo ');'; } | |
?> |
This file contains hidden or 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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
// -------- | |
/** | |
* Dump JSON from array | |
* | |
* For each array, an element with key '__json-type-hint' can be attached to hint structure type to | |
* generator. The value of '__json-type-hint' can be 'array' or 'dict'. | |
* |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
import os | |
import re | |
from distutils.command.build_scripts import build_scripts as _build_scripts | |
from distutils.command.install_scripts import install_scripts as _install_scripts | |
This file contains hidden or 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
diff -rupN squashfs4.2/squashfs-tools/Makefile squashfs4.2-mac/squashfs-tools/Makefile | |
--- squashfs4.2/squashfs-tools/Makefile 2011-03-01 04:04:15.000000000 +0800 | |
+++ squashfs4.2-mac/squashfs-tools/Makefile 2012-11-14 15:27:31.000000000 +0800 | |
@@ -104,7 +104,7 @@ UNSQUASHFS_OBJS = unsquashfs.o unsquash- | |
CFLAGS ?= -O2 | |
CFLAGS += $(EXTRA_CFLAGS) $(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 \ | |
-D_LARGEFILE_SOURCE -D_GNU_SOURCE -DCOMP_DEFAULT=\"$(COMP_DEFAULT)\" \ | |
- -Wall | |
+ -DFNM_EXTMATCH=0 -Wall | |
This file contains hidden or 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
if($opt =~ /^--pid=(.+)$/) | |
{ $PID = $1; $PID =~ s/\s+$//; } | |
elsif($opt =~/^--(working-dir|wd)=(.+)$/) | |
{ $WORKDIR = $2; $WORKDIR =~ s/\s+$//; } | |
elsif($opt =~/^--(log|terminal-log)=(.+)$/) | |
{ $TRMLOG = $2; $TRMLOG =~ s/\s+$//; } | |
elsif($opt =~/^--send-int-before-term=([0-9]+)$/) | |
{ $SEND_INT_BEFORE_TERM = int($1); } | |
elsif( ($opt eq '-v') or ($opt eq '--verbose') ) | |
{ $VERBOSE = 1; } |
This file contains hidden or 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 | |
""" Parsing timing information of sunrise and sunset from CWB """ | |
import sys | |
import csv | |
import re | |
import pprint | |