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
ƗƗɑƗƗɑƗƗɑ | |
(Ơ̴̴̴̴̴̴͡.̮Ơ̴̴͡) | |
(⌣́_⌣̀) | |
ƪ(˘⌣˘)┐ ƪ(˘⌣˘)Ʃ ┌(˘⌣˘)Ʃ | |
<( ‾^‾)--O)'` .̮´)ː̖́ | |
(>_<)○--(^o^)○ | |
(˛•̃•̃)/\(•̃•̃¸) | |
(˘̩̩̩.˘̩ƪ) | |
ƪ(♥ε♥)ʃ | |
(˘⌣˘)ε˘`) |
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
<? | |
function aes128_cbc_encrypt($key, $data, $iv) { | |
if(16 !== strlen($key)) $key = hash('MD5', $key, true); | |
if(16 !== strlen($iv)) $iv = hash('MD5', $iv, true); | |
$padding = 16 - (strlen($data) % 16); | |
$data .= str_repeat(chr($padding), $padding); | |
return mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $data, MCRYPT_MODE_CBC, $iv); | |
} |
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 | |
/** | |
* Remove any non-ASCII characters and convert known non-ASCII characters | |
* to their ASCII equivalents, if possible. | |
* | |
* @param string $string | |
* @return string $string | |
* @author Jay Williams <myd3.com> | |
* @license MIT License | |
* @link http://gist.github.com/119517 |
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 | |
#### | |
# Split MySQL dump SQL file into one file per table | |
# based on http://blog.tty.nl/2011/12/28/splitting-a-database-dump | |
#### | |
if [ $# -lt 1 ] ; then | |
echo "USAGE $0 DUMP_FILE [TABLE]" | |
exit |
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
#include <stdio.h> | |
#include <iconv.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <stdint.h> | |
int conv_utf8_to_ucs2(const char* src, size_t len) | |
{ | |
iconv_t cb = iconv_open("UTF-16", "UTF-8"); | |
if (cb == (iconv_t)(-1)) |
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 | |
/** | |
* Copyright (c) 2007, Roger Veciana | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* Redistributions of source code must retain the above copyright notice, this |
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 | |
//**NOTE**: This has *NOT* been tested yet; please provide feedback in the comments | |
//Drop-in replacement for PHP's SoapClient class supporting connect and response/transfer timeout and authentication | |
//Usage: Exactly as PHP's SoapClient class, except that some new options are available: | |
// timeout The response/transfer timeout in milliseconds; 0 == default SoapClient / CURL timeout | |
// connecttimeout The connection timeout; 0 == default SoapClient / CURL timeout | |
// sslverifypeer FALSE to stop SoapClient from verifying the peer's certificate | |
// sslversion The SSL version (2 or 3) to use. By default PHP will try to determine this itself, although in some cases this must be set manually | |
// sslverifyhost 1 to check the existence of a common name in the SSL peer certificate. 2 to check the existence of a common name and also verify that |
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 Process_Manager implements Countable | |
{ | |
protected $processes = array(); | |
protected $is_child = FALSE; | |
public function count() | |
{ | |
return count($this->processes); |
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
$OutputEncoding = New-Object -typename System.Text.UTF8Encoding | |
[Console]::OutputEncoding = New-Object -typename System.Text.UTF8Encoding |
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
#include <pthread.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <assert.h> | |
/* Compile like this: | |
gcc --std=c99 -lpthread cond.c -o cond |
OlderNewer