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 User{ | |
public function bred($a,$b){ | |
echo '<b>'.$a.'</b>'."<i>{$b}</i>"; | |
} | |
} | |
class service{ | |
public function __get($name) { |
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 service { | |
public function __get($name) { | |
if ($this->$name) | |
return $name; | |
else { | |
require_once 'controller/'.$name.'.php'; | |
$this->$name = new $name(); |
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
module.exports = { | |
create:function(){ | |
return { | |
poolLength:0, | |
free:[], | |
getId:function(){ | |
var id; | |
if(this.free.length == 0){ | |
id = ++this.poolLength; | |
} |
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
var request = require("request"); | |
var xmldom = require("xmldom"); | |
var dom = xmldom.DOMParser; | |
var xpath = require("xpath"); | |
var fs = require("fs"); | |
var items = {}; | |
var queries = ['late goodbye poets','max payne poets','potf late goodbye','late goodbye cover','max payne 2 theme','max payne 2 soundtrack','late goodbye max payne']; | |
var pushData = function(data){ | |
for(var id in data){ |
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
#!/bin/bash | |
####### CONFIG START ######## | |
OWNER_NAME='www-data' # Пользователь, которому будет принадлежать директория вирт. хоста | |
OWNER_GROUP='www-data' # Группа, которой будет принадлежать директория вирт. хоста | |
HOME_WWW=/var/www # Домашняя директория для вирт. хостов | |
HOST_DIRS=('backup' 'logs' 'www') | |
WHEREIS_APACHE=/etc/apache2 |
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
function GetGroupAttribute($users_id,$alias){ | |
$ret =''; | |
$id = $this->GetGroupId($alias); | |
$arr = $this->dsp->db->select_array('select A.USERS_ATTRIBUTE_ID, A.NAME, A.TABLENORMAL, A.ALIAS,A.USERS_ATTRIBUTETYPE_ID, A.MANDATORY,UAG.MANDATORY AS MAN, A.WISYWIG from USERS_ATTRGROUP_ATTR UAG | |
inner join USERS_ATTRIBUTE A on(A.USERS_ATTRIBUTE_ID=UAG.USERS_ATTRIBUTE_ID) where UAG.USERS_ATTRGROUP_ID=? and A.STATUS=1 order by UAG.ORDER_',$id); | |
if(isset($arr[0])){ | |
for($i=0;$i<count($arr);$i++){ | |
//fuck this shit | |
extract($arr[$i]); |
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
Bindable = (function() { | |
function Bindable() {} | |
Bindable.prototype.bind = function(cb) { | |
if (typeof this.subscribers === 'undefined') { | |
this.subscribers = []; | |
} | |
return this.subscribers.push(cb); | |
}; |
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
var cheerio = require('cheerio'), | |
request = require('request'), | |
MongoClient = require('mongodb').MongoClient; | |
var page = 1; | |
MongoClient | |
request('http://roxen.ru/?PAGEN_1='+page, function(err, res, body){ | |
if(err){ | |
console.log(err); |
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
var cheerio = require('cheerio'), | |
request = require('request'), | |
MongoClient = require('mongodb').MongoClient, | |
Q = require('q'); | |
var page = 1; | |
MongoClient.connect('mongodb://localhost/gamendex', function(err, db) { | |
if(err) throw err; | |
console.log("Connected to Database"); | |
var parsedCollection = db.collection('parsed'); |
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
var proxyStatisticGetter = function(){ | |
if (saveStat == null){ | |
saveStat = statistic.getTop(); | |
//flush data every 5 sec | |
setTimeout(function(){ | |
saveStat = null; | |
},5000); | |
} | |
return saveStat; | |
}; |
OlderNewer