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
<Response> | |
<Speak >This number does not accept incoming phone calls</Speak> | |
</Response> |
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
require 'rspec' | |
def flatten(arr) | |
result = Array.new | |
arr.each do |item| | |
result.concat item.kind_of?(Array) ? flatten(item) : [item] | |
end | |
result | |
end |
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
window.setTimeout(function(){ | |
var toolbar = $('div.markdown-toolbar'); | |
var textarea = $('textarea.markdown-textarea'); | |
var preview = $('div.markdown-preview'); | |
var current = "ltr"; | |
if(toolbar.length == 1) | |
{ | |
var btn = $('<button tabindex="-1" tooltip="RTL" style="background-image: url(http://git.mate-desktop.org/mate-themes/plain/icon-themes/ContrastHigh/32x32/actions/format-indent-more-rtl.png)" class="toolbar-button toolbar-button-flex"></button>'); |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCsaUsH2NsgRDNgT5BrodagWWI1L6KUm6vap/3OPWdNKj67QzncVDsMyXLosutzldVp1GzINudY3lXPrcDErGi7kQPcwL6CcKidg2wC5/SnUU+uuhOv3jjSR6tNvegI6jpQ1HYMOGSDV6qo6wlVfcTur9dHM8ZejqMXnTJJ7MbwK1MA2CbTOx0vy/o1lax7dvicPFuioVy5J6vzDbVSW10hhhFn6RSU0bIS7c5K6PxE/uauAs2ZVc8lsiqZf7p0Mq9U6FtEdQmCOhFB8MstUe9soYLDN7rWk7TdKL1Kz/GrggCo/B2jwczPfFNrH2TUlzqP6WjItW3Db7dIhsx7Jc8R raskin@TPG_DEV_001 |
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/php | |
<?php | |
/** | |
* .git/hooks/pre-commit | |
* | |
* This pre-commit hooks will check for PHP errors | |
* | |
*/ | |
RunPHPLoc(); |
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 Node | |
{ | |
/** @var int $value - The value of the item */ | |
public $value; | |
/** @var Node $next - Reference to the next item in list */ | |
public $next; |
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
// divides array into equal arrays, each of size n | |
function by(n, arr) | |
{ | |
function byby(n, arr, accum) | |
{ | |
if(arr.length < 1) return accum; | |
var head = [arr.slice(0,n)]; | |
var tail = arr.slice(n); | |
return byby(n, tail, accum.concat(head)); | |
} |
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 hybi10Encode($payload, $type = 'text', $masked = true) | |
{ | |
$frameHead = array(); | |
$frame = ''; | |
$payloadLength = strlen($payload); | |
switch($type) | |
{ |
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
class RamCache | |
{ | |
private static $data = array(); | |
public static function set($key, $value) | |
{ | |
self::$data[$key] = $value; | |
} | |
public static function get($key) |
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 the_last_function() | |
{ | |
static $haltCodes = array(E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR, E_RECOVERABLE_ERROR); | |
$error = error_get_last(); | |
if ($error && in_array($error['type'], $haltCodes)) | |
{ |
NewerOlder