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/sh | |
### BEGIN INIT INFO | |
# Provides: rc.firewall | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the firewall, NAT | |
# Description: starts the firewall, NAT | |
### END INIT INFO |
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/sh | |
if [ ! -f "$1" ]; then | |
echo "File $1 not exists" | |
exit; | |
fi | |
mysqlPath="/var/lib/mysql.bak.`date +%Y%m%d_%H%M`" | |
sudo mkdir $mysqlPath | |
sudo service mysql stop |
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
// uncomment the following to define a path alias | |
// Yii::setPathOfAlias('local','path/to/local-folder'); | |
// This is the main Web application configuration. Any writable | |
// CWebApplication properties can be configured here. | |
return array( | |
'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..', | |
'name' => 'FPR', | |
'sourceLanguage' => 'en_us', | |
'language' => 'ru', |
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
framework | rel | avg | 1 | 2 | 3 | 4 | 5 | |
------------------------ | -------- | -------- | -------- | -------- | -------- | -------- | -------- | |
baseline-php | 1.0000 | 2579.36 | 2594.56 | 2581.71 | 2587.63 | 2581.61 | 2551.30 | |
symfony-2.0.0alpha1 | 0.0878 | 226.37 | 226.44 | 227.65 | 226.11 | 225.54 | 226.09 | |
yii-1.1.1 | 0.0827 | 213.34 | 213.50 | 213.45 | 213.50 | 213.32 | 212.94 | |
yii-1.1.8 | 0.0738 | 190.29 | 190.04 | 190.29 | 190.11 | 190.10 | 190.93 | |
framework | rel | avg | 1 | 2 | 3 | 4 | 5 |
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
[push] | |
#Пушить только текущую ветку | |
default = tracking | |
[branch] | |
# Делать rebase при пуле при создании новой ветки | |
autosetuprebase = always | |
[user] | |
name = Rustam Zagirov | |
email = [email protected] | |
[color] |
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 CopyTestDb { | |
/** @var array Таблицы, которые не будут копироватся */ | |
static private $skip = array(); | |
/** @var array Таблицы, у которых нужно скопировать только схему */ | |
static private $onlySchema = 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
function microtime() { | |
return new Date().getTime() / 1000; | |
} | |
/** | |
* Удаляет данные из монги частями | |
* @param last_time - время последнего запроса | |
* @param collection - имя коллекции | |
* @param criteria - критерия для удаления | |
* @return {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
#grep from macos | |
➜ tmp time /usr/bin/grep "GET /out" nginx-access_log.2 | wc -l | |
140858 | |
/usr/bin/grep "GET /out" nginx-access_log.2 26.49s user 0.28s system 97% cpu 27.443 total | |
wc -l 0.03s user 0.02s system 0% cpu 27.443 total | |
➜ brew install grep | |
➜ tmp time grep "GET /out" nginx-access_log.2 | wc -l |
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
var posts=$$('.post_delete_button'), length = posts.length; for (i=0; i <length; i++) { posts[i].click() } |
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 5.4.23 BENCHMARK ####### | |
Start : 12/24/2013 16:49:12 pm | |
Server : @ | |
Platform : Darwin | |
PHP version: 5.4.23 | |
#################################### | |
for : 0.02550 sec | |
while : 0.01702 sec | |
if else : 0.08580 sec | |
switch : 0.11273 sec |
OlderNewer