This file contains hidden or 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 WebHookEvent | |
{ | |
private $name = null; | |
private $params = array(); | |
public function setName($event) | |
{ | |
$this->name = $event; |
This file contains hidden or 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
#http://pear.phpunit.de/ | |
sudo pear install phpunit/PHP_Invoker | |
sudo pear install phpunit/PHPUnit_Selenium | |
sudo pear install phpunit/PHPUnit_Story |
This file contains hidden or 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 | |
$CsvString = file_get_contents('https://raw.github.com/gavingmiller/second-level-domains/master/SLDs.csv'); | |
$Data = str_getcsv($CsvString, PHP_EOL); | |
foreach($Data as &$Row) { | |
list($tld, $stld) = str_getcsv($Row, ","); | |
$Row = $stld; | |
} | |
var_export($Data, true); |
This file contains hidden or 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/sh | |
git reset --hard HEAD | |
git pull | |
git submodule update --init |
This file contains hidden or 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 | |
/** | |
* BoxBilling | |
* | |
* LICENSE | |
* | |
* This source file is subject to the license that is bundled | |
* with this package in the file LICENSE.txt | |
* It is also available through the world-wide-web at this URL: | |
* http://www.boxbilling.com/LICENSE.txt |
This file contains hidden or 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 | |
import json | |
from subprocess import Popen, PIPE | |
txt = raw_input(); | |
cmd = txt.split() | |
o = None | |
e =None | |
try: | |
p = Popen(cmd, stdout=PIPE, stderr=PIPE) |
This file contains hidden or 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
backend default { | |
.host = "127.0.0.1"; # IP address of your backend (Apache, nginx, etc.) | |
.port = "8080"; # Port your backend is listening on | |
} | |
sub vcl_recv { | |
# Set the URI of your system directory | |
if (req.request == "POST" || req.http.X-Requested-With == "XMLHttpRequest") | |
{ |
This file contains hidden or 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 | |
register_shutdown_function(function() { | |
$error = error_get_last(); | |
$message = $error['message']; | |
if ($error['type'] == 64 && !empty($message)) { | |
throw new Exception($message); | |
} | |
}); |
This file contains hidden or 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
$(document).ready(function() { | |
function rC(nam) {var tC = document.cookie.split('; '); for (var i = tC.length - 1; i >= 0; i--) {var x = tC[i].split('='); if (nam == x[0]) return unescape(x[1]);} return '~';} | |
function wC(nam,val) {document.cookie = nam + '=' + escape(val);} | |
function lC(nam,pg) {var val = rC(nam); if (val.indexOf('~'+pg+'~') != -1) return false; val += pg + '~'; wC(nam,val); return true;} | |
function firstTime(cN) {return lC('meskuciobatonelis',cN);} | |
function thisPage() {var page = location.href.substring(location.href.lastIndexOf('\/')+1); pos = page.indexOf('.');if (pos > -1) {page = page.substr(0,pos);} return page;} | |
if (firstTime(thisPage())) { | |
$('<div>') |
This file contains hidden or 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 | |
/** | |
* @param int $timeout - max process execution time in seconds until it is terminated | |
**/ | |
function execute($cmd, $stdin = null, $timeout = 600) | |
{ | |
$this->log->debug("executing: " . $cmd . " ". $stdin); | |
$cmd = str_replace("\n", "", $cmd); | |
$cmd = str_replace("\r", "", $cmd); |