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
pragma solidity 0.8.4; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol"; | |
contract AmirSender { | |
address public owner; | |
mapping(uint24 => uint256) public eth_transaction_map; | |
mapping(uint24 => uint256) public tokens_transaction_map; | |
constructor() { |
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 | |
( | |
export PKG=eslint-config-airbnb; | |
npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest" | |
) | |
echo 'ahah' | |
echo '{"plugins":["prettier"], "extends":["airbnb", "prettier"], "rules": {"curly": ["error", "all"], "import/no-extraneous-dependencies": 0, "import/no-unresolved": 0}}' > .eslintrc |
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
#/usr/bin/tarantool | |
box.cfg{ | |
listen= tonumber(os.getenv('TNT_PORT')), | |
snapshot_period = 3600, | |
snapshot_count = 10, | |
replication_source={"localhost:3303","localhost:3304"} | |
} | |
box.once('grant_user_right', function() | |
box.schema.user.grant('guest', 'read,write,execute', 'universe') | |
end) |
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 http = require('http'); | |
var fs = require('fs'); | |
var checkFile = function(file){ | |
return new Promise(function(resolve, reject){ | |
fs.exists(file, function(exists){ | |
resolve(exists); | |
}); | |
}); | |
} |
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
/*global famous*/ | |
// import dependencies | |
var Engine = famous.core.Engine; | |
var Modifier = famous.core.Modifier; | |
var Transform = famous.core.Transform; | |
var ImageSurface = famous.surfaces.ImageSurface; | |
var Surface = famous.core.Surface; | |
var StateModifier = famous.modifiers.StateModifier; | |
var GridLayout = famous.views.GridLayout; | |
var View = famous.core.View; |
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; | |
}; |
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 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
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
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]); |
NewerOlder