Skip to content

Instantly share code, notes, and snippets.

View yallie's full-sized avatar

Alexey Yakovlev yallie

View GitHub Profile
@yallie
yallie / Turn off Screen.bat
Last active April 1, 2023 22:58 — forked from EugeneLoy/Turn off Screen.bat
Turns off the screen and locks the workstation
@echo off
:: see https://www.makeuseof.com/tag/3-quickest-ways-turn-computer-screen-windows/
:: see https://gist.github.com/EugeneLoy/150044d04b08e35d09e164c864e78da7
powershell (Add-Type '[DllImport(\"user32.dll\")]^public static extern int PostMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,2)
:: see https://www.pcreview.co.uk/threads/create-a-batch-file-to-lock-computer.3747748/post-12994020
Rundll32.exe User32.dll,LockWorkStation
@yallie
yallie / npm-packages-in-branches.txt
Created February 6, 2020 20:47 — forked from mengstr/npm-packages-in-branches.txt
How to store npm packages in github branches
#1) Create a new repo named "my-npm" and let github initialize it with a README (screenshot below)
#2) Clone it to your computer
git clone git@github.com:SmallRoomLabs/my-npm.git
#3) Go to the clone and create a new empty branch for the first package
cd my-npm
git checkout --orphan logger
#4) Delete all files in the folder
@yallie
yallie / introrx.md
Created April 9, 2017 22:55 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@yallie
yallie / github-wiki-how-to.md
Created December 11, 2016 21:32 — forked from subfuzion/github-wiki-how-to.md
GitHub Wiki How-To

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: git@github.com/myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo.

How do I add images to a wiki page?

You need to clone the wiki repo and edit it on your system.

@yallie
yallie / chardict4.cs
Last active December 14, 2015 03:59 — forked from rivantsov/chardict2.cs
An updated version of CompactCharDictionary: got rid of the CharLookupData class.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
/* Results
Dictionary. Time elapsed: 00:00:40.8066077, single iteration: 0,000408066077 ms.
CharDictionary. Time elapsed: 00:00:12.6748487, single iteration: 0,000126748487 ms
CompactCharDictionary. Time elapsed: 00:00:12.6878289, single iteration: 0,000126878289 ms