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
daemon off; | |
error_log stderr; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
# As suggested in http://nginx.org/en/docs/http/websocket.html | |
map $http_upgrade $connection_upgrade { |
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 namespace Initr\Services; | |
use Illuminate\Validation\Factory as LaravelValidator; | |
abstract class Validator | |
{ | |
protected $validator; | |
protected $data = array(); |
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
update-rc.d logstash-shipper defaults | |
update-rc.d logstash-reader defaults |
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
server { | |
listen 0.0.0.0; | |
root /var/www; | |
index index.php index.html index.htm; | |
location / { | |
try_files $uri $uri/ /index.php?$args; | |
} | |
location = /favicon.ico { | |
log_not_found off; |
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
# I installed phpbrew 1.3.0 since has problems with instlaing extentions using 1.3.1 | |
# see https://github.com/c9s/phpbrew/issues/214 | |
curl -O https://raw.github.com/c9s/phpbrew/master/phpbrew | |
chmod +x phpbrew | |
sudo cp phpbrew /usr/bin/phpbrew | |
phpbrew init | |
source ~/.phpbrew/bashrc |
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 | |
/* app/validators.php */ | |
Validator::extend('alpha_spaces', function($attribute, $value) | |
{ | |
return preg_match('/^[\pL\s]+$/u', $value); | |
}); | |
/* |
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
#Quick cp from http://sekati.com/etc/install-nodejs-on-debian-squeeze | |
# | |
#Needed to install TileMill from MapBox | |
# | |
#Installs node.js which has npm bundled | |
# | |
#Build Dependencies | |
sudo apt-get update && apt-get install git-core curl build-essential openssl libssl-dev |
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/bash | |
# run from: | |
# /var/www/vhosts/domain/ | |
COMMAND="$1" | |
if [[ -d ".lftp" && $COMMAND != "install" ]]; then | |
COMMAND="update" | |
else |
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 ProjectsController Extends BaseController { | |
public function getNew(){ | |
return dd(Sentry::getUserProvider()->createModel() | |
->join('throttle','throttle.user_id','=','users.id','left') | |
->where('throttle.banned',0) | |
->orWhere('throttle.banned',null) | |
->where('throttle.suspended',0) |
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
sudo bash | |
cd /usr/local/lib | |
wget http://launchpad.net/gearmand/trunk/0.18/+download/gearmand-0.18.tar.gz | |
tar -xvzf gearmand-0.18.tar.gz | |
cd gearmand-0.18/ | |
apt-get install libboost-program-options-dev uuid-dev libevent-dev build-essential g++ perf libcloog-ppl0 | |
./configure && sudo make && sudo make install | |
ldconfig |