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 | |
interface Validator | |
{ | |
public function isValid($value); | |
} |
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 | |
/** | |
* @package Swift | |
* @author Axel Etcheverry <axel@etcheverry.biz> | |
* @copyright Copyright (c) 2011 Axel Etcheverry (http://www.axel-etcheverry.com) | |
* Displays <a href="http://creativecommons.org/licenses/MIT/deed.fr">MIT</a> | |
* @license http://creativecommons.org/licenses/MIT/deed.fr MIT | |
*/ | |
/** |
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 | |
# | |
# mkv2m4v inputfile.mkv | |
# | |
# Given an MKV container with H.264 video & AC3 or DTS audio, converts | |
# quickly to an iPad-compatible MP4 container without re-encoding the | |
# video (so it must already be in an iPad-compatible resolution); the | |
# audio is downmixed to stereo with Dynamic Range Compression. | |
# | |
ME=$(basename $0) |
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 | |
echo "Test exception" . PHP_EOL; | |
echo "Test : explode()"; | |
try | |
{ | |
$data = '1 2 3 4'; | |
$v = explode('', $data); | |
echo "\t[ no ]" . PHP_EOL; | |
} |
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 | |
/** | |
* @see http://stackoverflow.com/a/15875555 | |
*/ | |
class UUID | |
{ | |
public static function random() | |
{ | |
if (function_exists('uuid_create')) { |
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
TRUNCATE RTINDEX rt; |
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
export EDITOR="vi" | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1) /' | |
} | |
parse_git_tag() { | |
git describe --always --tag 2> /dev/null | |
} |
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
--- src/c/src/mt_adaptor.c 2014-10-30 13:40:02.000000000 +0100 | |
+++ src/c/src/mt_adaptor.c 2014-10-30 13:40:58.000000000 +0100 | |
@@ -483,25 +483,9 @@ | |
int32_t fetch_and_add(volatile int32_t* operand, int incr) | |
{ | |
#ifndef WIN32 | |
- int32_t result; | |
- asm __volatile__( | |
- "lock xaddl %0,%1\n" | |
- : "=r"(result), "=m"(*(int *)operand) |
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 | |
export STAGE3=20140925 | |
wget https://github.com/euskadi31/gentoo-azure/archive/v1.0.9.tar.gz | |
tar -zxf v*.tar.gz | |
cd gentoo-azure-*/ | |
export SCRIPTS=$(pwd) | |
./provision.sh |
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 | |
# Paste at Pastebin.com using command line (browsers are slow, right?) | |
# coder : Anil Dewani | |
# date : Novemeber 7, 2010 | |
#help function | |
howto() | |
{ | |
echo "\ | |
Pastebin.com Bash Script \ |
NewerOlder