Skip to content

Instantly share code, notes, and snippets.

View sergeysova's full-sized avatar
👋
Open to network

Sova sergeysova

👋
Open to network
View GitHub Profile
var os = require('os');
var Type = os.type();
var Platform = os.platform();
var Release = os.release().split('.');
var Architecture = os.arch().replace('x', '');
console.log(Type, Platform, Release, Architecture);
'use strict'
// source:
// http://survivejs.com/webpack_react/authoring_libraries/
var path = require('path')
var webpack = require('webpack')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var merge = require('webpack-merge')
@sergeysova
sergeysova / bench.php
Last active August 29, 2015 14:06 — forked from anonymous/bench.php
<?
function simple() {
$a = 0;
for ($i = 0; $i < 1000000; $i++)
$a++;
$thisisanotherlongname = 0;
for ($thisisalongname = 0; $thisisalongname < 1000000; $thisisalongname++)
$thisisanotherlongname++;
}
@sergeysova
sergeysova / nginx.site.conf
Created October 8, 2014 13:09
nginx.site.conf
server {
listen 80;
root /var/www/intra/;
index index.php index.html index.htm;
server_name intra.local;
location / {
try_files $uri $uri/ =404;
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@sergeysova
sergeysova / nginx+nodejs
Created November 26, 2014 15:00
NginX + Node.JS configuration
upstream node_playkot {
server 127.0.0.1:1227;
keepalive 8;
}
server {
server_name playkot.lestad.net playkot.lestad.local;
listen 80;
charset UTF-8;
@sergeysova
sergeysova / ya.brow.kusto
Created December 8, 2014 21:01
Yandex.Browser Set title color and Dock color by closure function in console
(function(t,d){document.getElementsByTagName('head')[0].insertBefore((function(){var e = document.createElement('meta'); e.name="viewport"; e.content="ya-title="+t+", ya-dock="+d; return e;})())})
("white","fade")
mkdir -p ~/.vim/syntax/ && cd ~/.vim/syntax/ && wget -O nginx.vim 'http://www.vim.org/scripts/download_script.php?src_id=12990' && echo "au BufRead,BufNewFile /etc/nginx/* set ft=nginx" >> ~/.vim/filetype.vim && touch ~/.vimrc && echo ":syntax on" >> ~/.vimrc
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>
//replace http://agar.io/main_out.js by this file
//with Fiddler Web Debugger (AutoResponder tab)
//bots can be created in different rooms - so try restart the page if need
var totalBotCount = 0;
function game(h, r, bot, botUrl, botName) {