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 UserManager | |
{ | |
protected $couchbase; | |
public function __construct(\Couchbase $couchbase) | |
{ | |
$this->couchbase = $couchbase; | |
} |
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 | |
$key = preg_replace_callback( | |
'#_(\S)#', | |
function ($matches) { | |
return strtoupper($matches[1]); | |
}, | |
$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 | |
// Specify domains from which requests are allowed | |
header('Access-Control-Allow-Origin: *'); | |
// Specify which request methods are allowed | |
header('Access-Control-Allow-Methods: GET, POST, OPTIONS'); | |
/* | |
* jQuery < 1.4.0 adds an X-Requested-With header which requires pre-flighting |
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
hardstatus alwayslastline | |
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m-%d %{W}%c %{g}]' |
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
#based on http://tidy.sourceforge.net/docs/quickref.html | |
#HTML, XHTML, XML Options Reference | |
anchor-as-name: no #? | |
doctype: omit | |
drop-empty-paras: no | |
fix-backslash: no | |
fix-bad-comments: no | |
fix-uri:no | |
hide-endtags: yes #? | |
#input-xml: yes #? |
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 XDEBUG_CONFIG="idekey=PHPSTORM" |
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
ncat -l 8080 -k -c 'printf 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
import boto3 | |
import pprint | |
def lambda_handler(event, context): | |
ec2 = boto3.client('ec2') | |
resp = ec2.describe_instances( | |
Filters=[ | |
{ | |
'Name': 'instance-state-name', | |
'Values': [ |
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
FROM fluent/fluentd:v0.12.29 | |
RUN gem install fluent-plugin-elasticsearch -v 1.9.0 && \ | |
gem install fluent-plugin-record-modifier -v 0.5.0 | |
EXPOSE 24224 | |
COPY fluent.conf /etc/fluent.conf | |
CMD fluentd -c /etc/fluent.conf -p /fluentd/plugins |
OlderNewer