Skip to content

Instantly share code, notes, and snippets.

View andrexx's full-sized avatar

Andrii Chumak andrexx

View GitHub Profile
@andrexx
andrexx / editorconfig
Created October 6, 2020 10:24
underscore private fields
# Instance fields are camelCase and start with _
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
dotnet_naming_symbols.instance_fields.applicable_kinds = field
dotnet_naming_style.instance_field_style.capitalization = camel_case
dotnet_naming_style.instance_field_style.required_prefix = _
@andrexx
andrexx / gm.ps1
Created July 2, 2020 13:53
git operations by folders
param (
# The root directory to perform the pull in
$baseDir = ".",
# How deep down you want to look for .git folders
$depth = 2,
# The command you want to perform
$cmd = "status"
)
@andrexx
andrexx / gm.ps1
Created April 28, 2020 08:28
git operations with subfolders
param (
# The root directory to perform the pull in
$baseDir = ".",
# How deep down you want to look for .git folders
$depth = 2,
# The command you want to perform
$cmd = "status"
)
#EXTM3U
#EXTINF:-1 tvg-name="Skrypin UA", Skrypin UA
http://play.lanet.tv/index/1008.m3u8?key=TInsKnAmphl7Rmta&q=max&ssl=false
#EXTINF:-1 tvg-name="Ланет INFO", Ланет INFO
http://play.lanet.tv/index/2010.m3u8?key=TInsKnAmphl7Rmta&q=max&ssl=false
#EXTINF:-1 tvg-name="Ланет LIVE", Ланет LIVE
http://play.lanet.tv/index/2008.m3u8?key=TInsKnAmphl7Rmta&q=max&ssl=false
#EXTINF:-1 tvg-name="Ланет FLIX", Ланет FLIX
http://play.lanet.tv/index/2001.m3u8?key=TInsKnAmphl7Rmta&q=max&ssl=false
#EXTINF:-1 tvg-name="Ланет PLAY", Ланет PLAY
@andrexx
andrexx / index.html
Created June 1, 2018 19:01
compare underscore isNumber with Number.isFinite
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
@andrexx
andrexx / tips_increase_memory_limit_nodejs.js
Created April 8, 2018 22:12 — forked from motss/tips_increase_memory_limit_nodejs.md
[TIPS] Increase memory limit in Node.js
// By default the memory limit in Node.js is 512MB.
// This will cause FATAL ERROR- JS Allocation failed – process out of memory when processing large data files.
// It can be avoided by increasing the memory limit.
node --max_old_space_size=1024 server.js // increase to 1gb
node --max_old_space_size=2048 server.js // increase to 2gb
node --max_old_space_size=3072 server.js // increase to 3gb
node --max_old_space_size=4096 server.js // increase to 4gb
node --max_old_space_size=5120 server.js // increase to 5gb
node --max_old_space_size=6144 server.js // increase to 6gb
@andrexx
andrexx / .gitconfig
Created August 23, 2017 09:12
git coonfig template
[user]
name = XXX
email = XXX
[core]
preloadindex = true
fscache = true
autocrlf = true
[http]
sslVerify = false
[push]
@andrexx
andrexx / dump.js
Created January 11, 2016 14:55
find all custom
// http://stackoverflow.com/questions/17246309/get-all-user-defined-window-properties
(function () {
var results, currentWindow,
// create an iframe and append to body to load a clean window object
iframe = document.createElement('iframe');
iframe.style.display = 'none';
document.body.appendChild(iframe);
// get the current list of properties on window
currentWindow = Object.getOwnPropertyNames(window);
// filter the list against the properties that exist in the clean window
@andrexx
andrexx / gist:24a985520b1e3acb2c2e
Last active August 29, 2015 14:16
Display MVC routes
public ActionResult Test()
{
var sb = new StringBuilder();
using (RouteTable.Routes.GetReadLock())
{
foreach (var routeBase in RouteTable.Routes)
{
if (routeBase.GetType().ToString() == "System.Web.Mvc.Routing.LinkGenerationRoute")
{
continue;
<table class="result-table">
<tr>
<td colspan="2" class="wordwrap"><div class="result-title">@Model.Result.RequestType </div></td>
</tr>
<tr>
<td class="col1">1</td>
<td class="col2 wordwrap">@Model.Result.RegistrationNumber</td>
</tr>
<tr>
<td class="col1">2</td>