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 | |
/** | |
* Incremental DB Backup Script. | |
* | |
* Requires: innobackupex percona script. | |
* | |
* Meant to run via cron, every 8 hours. It assumes during the fourth | |
* invocation a day has gone by. | |
* | |
* @author Kingcat <kingcat@nzb.cat> |
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 | |
namespace app\extensions\data\behavior; | |
use nzedb\Users; | |
use lithium\aop\Filters; | |
class Vip extends \li3_behaviors\data\model\Behavior | |
{ |
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
{ | |
"Ansi 5 Color" : { | |
"Green Component" : 0.4117647111415863, | |
"Blue Component" : 0.78823530673980713, | |
"Red Component" : 0.55686277151107788 | |
}, | |
"Working Directory" : "\/Users\/david", | |
"Prompt Before Closing 2" : 0, | |
"Selected Text Color" : { | |
"Green Component" : 0.729411780834198, |
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 CheckoutView(View): | |
form_class = CheckoutForm | |
template = 'account/checkout.html' | |
email_template_name = 'account.checkout_success' | |
def create_sub(self, user, customer, plan, quantity): | |
subscription = customer.subscriptions.create(plan=plan, quantity=quantity) | |
user.stripe_subscription_id = subscription.id | |
user.save() |
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
# configuration file /etc/nginx/nginx.conf: | |
# Configuration File - Nginx Server Configs | |
# http://nginx.org/en/docs/dirindex.html | |
# Run as a unique, less privileged user for security reasons. | |
# Default: nobody nobody | |
user www-data www-data; | |
# Sets the worker threads to the number of CPU cores available in the system for best performance. | |
# Should be > the number of CPU cores. |
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 | |
$log = fopen('/tmp/webhook.log', 'a+'); | |
ob_start(); | |
var_dump($_SERVER); | |
$content = ob_get_clean(); | |
fwrite($log, $content); | |
fclose($log); |
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 | |
namespace nzedb\frontend\donation\Blockchain; | |
/** | |
* Super simple Blockchain.info V2 Receive API implementation. | |
* | |
* Also some usecase-specific conversion methods. | |
* @package nzedb\frontend\donation\Blockchain | |
*/ | |
class Blockchain |
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
location /sabnzbd { | |
client_max_body_size 10m; | |
client_body_buffer_size 128k; | |
#Timeout if the real server is dead | |
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503; | |
# Advanced Proxy Config | |
send_timeout 5m; | |
proxy_read_timeout 240; |
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 | |
protected static function _filters($model, $behavior) | |
{ | |
Filters::apply($model, 'save', function ($params, $next) use ($behavior) { | |
foreach ($behavior->config('fields') as $field) { | |
$params['data'][$field] = static::_btcToSatoshi($behavior, $params['entity'], $field); | |
} | |
return $next($params); |
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
fluffPhraseList = ['actually', 'in-all-actuality', 'how about that', 'however then', 'however because of that', 'and also', 'and/or', 'as to whether', 'basically', 'essentially', 'technically', 'totally', 'for sure', 'being that ', 'being as', 'on account of that', 'on account of ', 'on account of this', 'point in time', 'that time', 'this time', 'quite', 'really', 'so as to', 'sort of', 'try and', 'very', 'well then', 'even then', 'so then', 'really then', 'although then', 'however then', 'also then', 'then also', 'as then', 'if then', 'therefore then', 'overall then', 'and though', 'and because of this', 'and because of that', 'and furthermore', 'and however', 'and this is because', 'and overall', 'and now', 'because ', 'because of this', 'because of that', 'because this is', 'this is because', 'because that is', 'because i am', 'because you are', 'furthermore because of that', 'because furthermore', 'overall because of that', 'because overall', 'because now', 'because that', 'that is because', 'because how |
NewerOlder