Skip to content

Instantly share code, notes, and snippets.

View vorou's full-sized avatar

Viktor Voropaev vorou

View GitHub Profile
@alekseykulikov
alekseykulikov / index.md
Last active February 6, 2025 21:20
Principles we use to write CSS for modern browsers

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@MikeMKH
MikeMKH / Demo.cs
Created September 14, 2015 18:11
Example of using Moq with Auto Fixture
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using Ploeh.AutoFixture;
using Ploeh.AutoFixture.AutoMoq;
namespace AutoFixtureDemo.MSTest
{
public class Echoer
{
@CMCDragonkai
CMCDragonkai / http_streaming.md
Last active September 23, 2025 21:29
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@pwelter34
pwelter34 / default.ps1
Created July 25, 2014 15:56
psake robocopy
Task Output -Depends Compile {
“Copy Outputs...”
$xf = @("*.log", "*.txt", "*.md", "*.xml", "*.pdb")
$xd = @(".git", "obj")
& robocopy "$SourceDir\bin\$BuildConfig" "$BuildDir\Output" $np /XF $xf /XD $xd /NP
if ($lastexitcode -ge 8) {
throw ("RoboCopy: Error copying files.")
@crunchie84
crunchie84 / UriJsonTypeConverter.cs
Last active August 29, 2015 13:57
custom uri typeconvert to string for ElasticSearch indexing
namespace Domain.TypeConverters
{
using System;
using Newtonsoft.Json;
/// <summary>
/// Converter for converting Uri to String and vica versa
/// </summary>
/// <remarks>
/// Code originated from http://stackoverflow.com/a/8087049/106909
@jongalloway
jongalloway / Script-Chocolatey-Installed-Packages.ps
Last active December 18, 2017 08:28
Creates a list of cinst commands based on what you've already got installed.
clist -l -r -y | % { "cinst " + $_.SubString(0,$_.IndexOf("|")) + " /y" }
@jrsconfitto
jrsconfitto / GHfW keyboard.md
Last active April 3, 2023 08:16
GitHub for Windows Keyboard Shortcuts

Keyboard shortcuts for GHfW

Here's a listing of all the GHfW keyboard stuff that i can think of. Now i know them after writing this, but i figured it would be nice to have these documentated somewhere.

Rant: i dont know why people say that Windows users dont like using the keyboard for everything. That's certainly not true for me. Though, that may be the case from using Unix in college.

All screens

You can use Alt shortcuts. Hold down Alt and you'll see the underlines. Menus brought up this way have j & k navigations! Try it on the tools menu.

@jpoehls
jpoehls / encoding-helpers.ps1
Created April 17, 2012 14:54
Convert-FileEncoding and Get-FileEncoding
<#
.SYNOPSIS
Converts files to the given encoding.
Matches the include pattern recursively under the given path.
.EXAMPLE
Convert-FileEncoding -Include *.js -Path scripts -Encoding UTF8
#>
function Convert-FileEncoding([string]$Include, [string]$Path, [string]$Encoding='UTF8') {
$count = 0