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
local hostname="%{$fg_bold[black]%}%m" | |
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)" | |
PROMPT='${hostname} ${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" |
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
{ | |
"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
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 | |
### BEGIN INIT INFO | |
# Provides: foo | |
# Defalt-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Description: Writes TCP on port 8725 to a file | |
### END INIT INFO | |
source /etc/rc.d/init.d/functions |
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
diff -Naur php-pecl-parsekit-1.3.0.orig/parsekit-1.3.0/parsekit.c php-pecl-parsekit-1.3.0/parsekit-1.3.0/parsekit.c | |
--- php-pecl-parsekit-1.3.0.orig/parsekit-1.3.0/parsekit.c 2014-08-16 21:55:32.000000000 +0400 | |
+++ php-pecl-parsekit-1.3.0/parsekit-1.3.0/parsekit.c 2014-08-18 12:50:05.377165855 +0400 | |
@@ -300,7 +300,7 @@ | |
} | |
add_assoc_long(return_value, "num_args", ops->num_args); | |
add_assoc_long(return_value, "required_num_args", ops->required_num_args); | |
- add_assoc_bool(return_value, "pass_rest_by_reference", ops->fn_flags & ZEND_ACC_PASS_REST_BY_REFERENCE); | |
+ add_assoc_bool(return_value, "pass_rest_by_reference", ops->fn_flags & ZEND_ACC_VARIADIC); | |
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 python | |
""" | |
Translate a CSV document with a header to a YAML document that is a list of maps. | |
Uses constant memory and keeps field names in the original order. | |
""" | |
import sys | |
import csv | |
import yaml # requires PyYAML |
NewerOlder