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
[program:something_uwsgi] | |
user=something | |
process_name=%(program_name)s | |
directory=/home/something/something.info | |
command=/usr/bin/uwsgi -y /home/something/something.info/app/uwsgi.yaml | |
stdout_logfile=/home/something/something.info/log/supervisord_uwsgi.log | |
stderr_logfile=/home/something/something.info/log/supervisord_uwsgi.error | |
autostart=true | |
autorestart=true | |
redirect_stderr=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
user www-data; | |
worker_processes 4; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
use epoll; | |
multi_accept on; | |
} |
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
<script type="text/ng-template" id="one.html"> | |
<div>This is first template</div> | |
</script> | |
<script type="text/ng-template" id="two.html"> | |
<div>This is second template</div> | |
</script> |
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
// 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 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
import os | |
import sys | |
import MySQLdb | |
MYSQL_HOST = "localhost" | |
MYSQL_USER = "testuser" | |
MYSQL_PASSWORD = "testpass" | |
MYSQL_DB = "test" | |
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 | |
/** | |
* NestedSetBehavior class file. | |
* | |
* @author Alexander Kochetov <[email protected]> | |
* @link https://github.com/yiiext/nested-set-behavior | |
*/ | |
/** | |
* Provides nested set functionality for a model. |
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 | |
$criteria = new CDbCriteria(); | |
$criteria->condition = "status IN(1)"; | |
$criteria->mergeWith($model->lang()->children()->getDbCriteria()); | |
$criteria->order = "type ASC, create_time DESC"; | |
Pages::model()->findAll($criteria); |
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
$qs = User::objects(); | |
$qs = $qs->filter(...); | |
$qs = $qs->exclude(...); | |
$qs = $qs->order(); |
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 | |
$user_qs = User::objects()->filter([ | |
'group__permission__code__in' => [ | |
'can_create' => true, | |
'can_update' => true, | |
'can_delete' => false | |
], | |
'is_active__isnull' => false, | |
'cart__price__gte' => 10000, |
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
package main | |
import ( | |
"github.com/coreos/go-etcd/etcd" | |
"log" | |
"strings" | |
) | |
var etcdKey string | |
var backends []string |