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 ( | |
"fmt" | |
"github.com/moovweb/gokogiri" | |
"io/ioutil" | |
"net/http" | |
"net/url" | |
"time" | |
) |
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
<VirtualHost 127.0.0.1:81> | |
DocumentRoot "/absolute/path/to/project/www" | |
DirectoryIndex index.php | |
ServerAdmin [email protected] | |
ServerAlias test.dev | |
ErrorLog "/absolute/path/to/project/logs/apache-error.log" | |
CustomLog "/absolute/path/to/project/logs/apache-access.log" common |
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/perl | |
use strict; | |
use warnings; | |
my $exclude_list_path_static = "/etc/ovznodes_backup_rsync_exclude_list.static"; | |
my $exclude_list_path_dynamic = "/etc/ovznodes_backup_rsync_exclude_list.dynamic"; | |
my $config_file_path = '/etc/ovznodes_backup_config'; | |
# должна объявляться в конфиге |
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 |
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
$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 | |
$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
<?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
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |