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 | |
/** | |
* Create a directory in the system temp directory with a hard-to-predict name. | |
* Does not have the guarantees of the actual BSD libc function or Python tempfile function. | |
* @param string $suffix Append to the new directory's name | |
* @param string $prefix Prepend to the new directory's name | |
* @return string The path of the new directory. | |
*/ | |
function mkdtemp($suffix = '', $prefix = 'tmp') |
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 | |
/** | |
* Delete a file or directory recursively. | |
* @param string $path | |
*/ | |
function rmtree($path) | |
{ | |
if (is_dir($path)) | |
{ |
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
// compile with gcc -std=c99 -Wall lsflags.c -o lsflags | |
#include <errno.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <unistd.h> | |
#include <sys/stat.h> |
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
""" | |
Decorate SCons Environment constructor so that Homebrew paths are always included. | |
""" | |
from functools import wraps | |
import SCons.Environment | |
# Homebrew install directory | |
homebrew = '/opt/homebrew' |
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 | |
function master() | |
{ | |
$num_partitions = 10; | |
// not every system has this :( | |
//setproctitle("Parallel master: {$num_partitions} partitions"); | |
$workers = []; |
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 | |
# Ubuntu version of package: http://packages.ubuntu.com/trusty/libapache2-mod-auth-openid | |
# FPM man page: https://github.com/jordansissel/fpm/wiki | |
# FPM instructions for autotools: https://github.com/jordansissel/fpm/wiki/PackageMakeInstall | |
# install build-time dependencies | |
# yes, apache2 is a build-time dependency, otherwise APXS breaks: | |
# "checking Apache version... configure: error: /usr/bin/apxs2 says that your apache binary lives at /usr/sbin/apache2 but that file isn't executable." | |
sudo aptitude -y install \ |
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
module Main where | |
{- | |
Utility to automatically install and patch the Mac OS X version | |
of Unreal Tournament 2004 from the Mac demo and patcher | |
and PC installation disc images and CD key. | |
Can automatically download the demo and patcher. | |
see: http://lowetechlabs.com/UT2004-WIN2OSX/ | |
see: http://forums.macnn.com/showthread.php?t=292620 |
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 | |
wget \ | |
--execute robots=off \ | |
--no-check-certificate \ | |
--mirror \ | |
--html-extension \ | |
--convert-links \ | |
--backup-converted \ | |
--page-requisites \ |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Action": [ | |
"ec2:Describe*" | |
], | |
"Effect": "Allow", | |
"Resource": "*" | |
} |
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 | |
""" | |
Look for binaries on $PATH that use the wordexp() POSIX libc function. | |
Only looks at dynamically linked binaries. | |
Works on Mac OS X and Linux systems, Python versions 2.4 to 3.4. | |
""" | |
import subprocess | |
import os | |
import sys |
OlderNewer