Skip to content

Instantly share code, notes, and snippets.

János Orcsik janosorcsik

Block or report user

Report or block janosorcsik

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@janosorcsik
janosorcsik / flexbox-cheat-sheet.md
Created Aug 4, 2019 — forked from sw-yx/flexbox-cheat-sheet.md
cheat sheet from flexbox.io
View flexbox-cheat-sheet.md
@janosorcsik
janosorcsik / launch.json
Last active Jan 27, 2019
Launch.json for Electron debuggin in VS Code
View launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Electron: Main",
"protocol": "inspector",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"runtimeArgs": [
@janosorcsik
janosorcsik / active.md
Created Jun 2, 2018 — forked from Tyrael/active.md
active github users from Hungary
View active.md

Most active GitHub users from Hungary

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Sun, 30 Aug 2015 10:08:52 GMT till Tue, 30 Aug 2016 10:08:52 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
  .filter(user => user.followers > 1)
@janosorcsik
janosorcsik / what-forces-layout.md
Created Dec 30, 2017 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.
View what-forces-layout.md

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@janosorcsik
janosorcsik / DateTimeCollisionCheck.md
Last active Dec 11, 2017
DateTime collision check
View DateTimeCollisionCheck.md

Not nullable

(x.StartDate >= StartDate && x.StartDate <= EndDate ||
x.EndDate >= StartDate && x.EndDate <= EndDate ||
x.StartDate <= StartDate && x.EndDate >= EndDate)))

EndDate is nullable

((EndDate.HasValue && x.StartDate >= StartDate && x.StartDate <= EndDate.Value) ||
(!EndDate.HasValue && x.StartDate >= StartDate && x.StartDate <= DateTime.MaxValue) ||
View MethodLocationPatternConverter.cs
using log4net.Layout.Pattern;
using log4net.Core;
using System.IO;
namespace LoggerExtensions
{
public class MethodLocationPatternConverter : PatternLayoutConverter
{
protected override void Convert(TextWriter writer, LoggingEvent loggingEvent)
{
@janosorcsik
janosorcsik / Mapper.cs
Last active Dec 11, 2017
Object mapper
View Mapper.cs
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
namespace ObjectExtensions
{
public static class Mapper
{
public static T SetProperty<T>(this T host, string propertyName, object value, bool hideErrors = false)
@janosorcsik
janosorcsik / XMLTools.cs
Last active Dec 11, 2017
Generic XML writer and reader with encoding
View XMLTools.cs
using System;
using System.IO;
using System.Text;
using System.Xml.Serialization;
namespace Tools
{
public class XMLTools
{
#region singleton
View FakeHQContext.cs
using System;
using System.Data.Entity;
using System.Linq;
using System.Reflection;
using Entities.HQ;
using Repositories.Contexts;
namespace TestUtils
{
public class FakeHQContext : IHQContext
@janosorcsik
janosorcsik / TestExtensions.cs
Last active Dec 11, 2017
Unit test extensions
View TestExtensions.cs
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Web.App_Start;
You can’t perform that action at this time.