Skip to content

Instantly share code, notes, and snippets.

View berezovskyi's full-sized avatar

Andrew Berezovskyi berezovskyi

View GitHub Profile
@berezovskyi
berezovskyi / UnrecycleThem.cs
Created August 20, 2020 13:32 — forked from TJYSunset/UnrecycleThem.cs
This program restores all files in your recycle bin. I wrote this because explorer failed to restore too many files. It's tested on Windows 10, Chinese Simplified and must be edited to run properly on Windows of other languages.
using System;
using System.Runtime.InteropServices;
using Shell32;
namespace UnrecycleThem
{
public class UnrecycleThem
{
public static void Main(string[] args)
{
@berezovskyi
berezovskyi / import.scpt
Created February 18, 2018 19:44 — forked from shapiro125/import.scpt
Applescript: Import Apple Notes to Evernote
tell application "Notes"
set theMessages to every note
repeat with thisMessage in theMessages
# added identification of folder to create notebooks based on existing folder hierarchy
set myFolder to the container of thisMessage
@berezovskyi
berezovskyi / import.scpt
Created February 18, 2018 19:43 — forked from bzerangue/import.scpt
Applescript: Import Apple Notes to Evernote
tell application "Notes"
set theMessages to every note
repeat with thisMessage in theMessages
set myTitle to the name of thisMessage
set myText to the body of thisMessage
@berezovskyi
berezovskyi / problem.cpp
Created April 1, 2017 12:09 — forked from depp/problem.cpp
A Faster Solution
// Faster solution for:
// http://www.boyter.org/2017/03/golang-solution-faster-equivalent-java-solution/
// With threading.
// g++ -std=c++11 -Wall -Wextra -O3 -pthread
// On my computer (i5-6600K 3.50 GHz 4 cores), takes about ~160 ms after the CPU
// has warmed up, or ~80 ms if the CPU is cold (due to Turbo Boost).
// How it works: Start by generating a list of losing states -- states where the
// game can end in one turn. Generate a new list of states by running the game