Skip to content

Instantly share code, notes, and snippets.

View mrspartak's full-sized avatar
🏠
Working from home

Spartak mrspartak

🏠
Working from home
View GitHub Profile
@mrspartak
mrspartak / track_requests.js
Created August 16, 2017 12:14
Track requests
//add this lines before all code
const http = require('http');
const originalRequest = http.request;
http.request = function wrapMethodRequest(req) {
console.log('TRACKED', req.host);
return originalRequest.apply(this, arguments);
}
var RustStatsCom = {
Title : "Rust-Stats.Com",
Author : "John Wick",
Version : V(0, 0, 1),
Description : "Collect stats from server to site rust-stats.com",
Init: function() {
print("Init works!");
rust.RunServerCommand('status', {});
Function FindInRangeValue(Diapazon As Range, Values As Range, Search) As String
Dim row As Range
For Each row In Diapazon.Rows
If row.Columns(1).Value <= Search Then
If row.Columns(2).Value >= Search Then
FindInRangeValue = Values.Rows(row.row).Value
End If
End If
Next row
End Function
https://github.com/plimble/ace
https://github.com/zenazn/goji !
https://github.com/codegangsta/gin !
http://www.gorillatoolkit.org/pkg/mux
@mrspartak
mrspartak / 0_reuse_code.js
Last active August 29, 2015 14:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?
class Bench
{
const defaultName = 'default';
private $_container = array();
public function start($name = self::defaultName)
{
$this->_container[$name] = array(
@mrspartak
mrspartak / gist:5336322
Last active December 15, 2015 22:58
Count lines of code Usage: run in current directory, or just pass the path to directory as parameter in CLI. Returns: json
<?php
ini_set('xdebug.max_nesting_level', 0);
$dir = $argv[1] ? $argv[1] : dirname(__FILE__);
if(!is_dir($dir))
exit('Error');
$global = array();
read($dir);