Skip to content

Instantly share code, notes, and snippets.

View Kashkovsky's full-sized avatar
😎

Denys Kashkovskyi Kashkovsky

😎
  • Grammarly, Inc.
  • Kyiv, Ukraine
View GitHub Profile
@robmiller
robmiller / git-cleanup-repo
Last active February 27, 2024 10:09
A script for cleaning up Git repositories; it deletes branches that are fully merged into `origin/master`, prunes obsolete remote tracking branches, and as an added bonus will replicate these changes on the remote.
#!/bin/bash
# git-cleanup-repo
#
# Author: Rob Miller <rob@bigfish.co.uk>
# Adapted from the original by Yorick Sijsling
git checkout master &> /dev/null
# Make sure we're working with the most up-to-date version of master.
git fetch
@zaknafeyn
zaknafeyn / Command line parser
Last active August 6, 2019 15:06
Command line parser
Написать приложение-парсер для параметров, введенных из консоли.
Список правил:
CommandParser.exe [/?] [/help] [-help] [-k key value] [-ping] [-print <print a value>]
CommandParser.exe - вызов приложения без параметров показывает то же, что и вызов помощи
/?, /help,-help - вызов помощи
@programulya
programulya / algo-task-c#
Last active August 6, 2019 15:06
Algo task for C# cats
ENG
Solve the system of linear equations using Gaussian elimination (also known as row reduction) with the general element in rows.
Calculate the X vector and vector of errors (E = B-A*X):
-3*x1 + 4*x2 + x3 + 4*x4 = -1;
1*x2 + 3*x3 + 2*x4 = -1;
4*x1 - 2*x3 - 3*x4 = 4;
1000*x1 + 3*x2 + x3 - 5*x4 = -2.
The program should contain:
// ==UserScript==
// @name TFS ETS Reporting
// @namespace http://timeserver
// @version 0.3
// @description this one helps properly reporting ETS with TFS items.
// @author areva
// @match timeserver/timereports.ets
// @match timeserver.i.sigmaukraine.com/timereports.ets
// @match ets.sigmaukraine.com:7443/timereports.ets
@jjnilton
jjnilton / mac-network-commands-cheat-sheet.md
Last active July 18, 2024 16:06
Mac Network Commands Cheat Sheet

Disclaimer: I'm not the original author of this sheet, but can't recall where I found it. If you know the author, please let me know so I give the attribution.

The original author seems to be Charles Edge, here's the original content, as pointed out by @percisely.

Note: Since this seems to be helpful to some people, I formatted it to improve readability of the original. Also, note that this is from 2016, many things may have changed, and I don't use macOS anymore, so I probably can't help in case of questions, but maybe someone else can.

Mac Network Commands Cheat Sheet

After writing up the presentation for MacSysAdmin in Sweden, I decided to go ahead and throw these into a quick cheat sheet for anyone who’d like to have them all in one place. Good luck out there, and s

@Kashkovsky
Kashkovsky / CorsHandler.cs
Last active November 6, 2020 10:33
CORS delegating handler for Web API
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
//Add to Global.asax -- GlobalConfiguration.Configuration.MessageHandlers.Add(new CorsHandler());
namespace Common.Helpers
{
public class CorsHandler : DelegatingHandler
@Kashkovsky
Kashkovsky / StringHelper.cs
Created June 3, 2016 13:47
StringHelper Extension
using System.Linq;
using System.Text.RegularExpressions;
namespace Common.Extensions
{
public static class StringHelper
{
public static string ToUpperFirstChar(this string input)
{
if (string.IsNullOrEmpty(input))
@Kashkovsky
Kashkovsky / AllowCrossDomainJsonAttribute.cs
Created June 3, 2016 13:49
MVC Attribute allowing cross-domain requests
using System.Linq;
using System.Web.Mvc;
namespace Common.Helpers
{
public class AllowCrossDomainJsonAttribute : ActionFilterAttribute
{
const string Origin = "Origin";
const string AccessControlAllowOrigin = "Access-Control-Allow-Origin";
public override void OnActionExecuting(ActionExecutingContext filterContext)
@Kashkovsky
Kashkovsky / launch.json
Created July 18, 2018 17:04
Debug typescript jest tests in VS Code
/** .vscode/launch.json */
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest Tests",
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
"args": [
@oleksiilevzhynskyi
oleksiilevzhynskyi / grammarly_web_frontend_resources.md
Last active July 19, 2024 07:54
Grammarly web front-end resources