Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Berezovskyi berezovskyi

View GitHub Profile
View itertar.py
def itertar(tar):
while True:
n = tar.next()
if n is None:
break
else:
yield n
View rvm-brew.log
Are you sure you wish to upgrade from ruby-2.6.3 to ruby-2.7.0? (Y/n):
Installing new ruby ruby-2.7.0
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.15/x86_64/ruby-2.7.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Error: Calling `brew list` to only list formulae is disabled! Use `brew list --formula` instead.
Error: Calling `brew list` to only list formulae is disabled! Use `brew list --formula` instead.
Error: Calling `brew list` to only list formulae is disabled! Use `brew list --formula` instead.
Error: Calling `brew list` to only list formulae is disabled! Use `brew list --formula` instead.
View mono.sh
git clone git@github.com:eclipse/lyo.git
# we can also do https://www.hanselman.com/blog/easily-rename-your-git-default-branch-from-master-to-main here or at the end
git clone git@github.com:eclipse/lyo.domains.git
git tag v4.0.0.M2-domains 897c4bde35bddad08f7740eafb504771d7c4ac03
git remote add domains ../lyo.domains
git fetch domains --tags
git merge --allow-unrelated-histories domains/master
@berezovskyi
berezovskyi / do.sh
Created Oct 30, 2020
insert BSD license after XML preamble
View do.sh
sed '1a\
<!--\
Copyright (c) $YEAR $OWNER, All rights reserved.\
\
Redistribution and use in source and binary forms, with or without modification,\
are permitted provided that the following conditions are met:\
\
Redistributions of source code must retain the above copyright notice, this\
list of conditions and the following disclaimer. Redistributions in binary\
form must reproduce the above copyright notice, this list of conditions and\
@berezovskyi
berezovskyi / UnrecycleThem.cs
Created Aug 20, 2020 — 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.
View UnrecycleThem.cs
using System;
using System.Runtime.InteropServices;
using Shell32;
namespace UnrecycleThem
{
public class UnrecycleThem
{
public static void Main(string[] args)
{
View test.kt
import org.apache.jena.rdf.listeners.ChangedListener
import org.apache.jena.rdf.model.InfModel
import org.apache.jena.rdf.model.Model
import org.apache.jena.rdf.model.ModelFactory
import org.apache.jena.reasoner.rulesys.RDFSRuleReasonerFactory
import org.apache.jena.riot.RDFDataMgr
import org.apache.jena.riot.RDFFormat
import org.apache.jena.util.FileUtils
import org.apache.jena.vocabulary.RDF
import org.apache.jena.vocabulary.ReasonerVocabulary
@berezovskyi
berezovskyi / import.scpt
Created Feb 18, 2018 — forked from shapiro125/import.scpt
Applescript: Import Apple Notes to Evernote
View import.scpt
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 Feb 18, 2018 — forked from bzerangue/import.scpt
Applescript: Import Apple Notes to Evernote
View import.scpt
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
View vomit.java
public class MyClass {
@Autowired
private ConvertAToB convertAToB;
@Autowired
private ConvertBToC convertBToC;
@Autowired
private ConvertCToD convertCToD;
View exceptions.txt
AWTException
AclNotFoundException
ActivationException
AlreadyBoundException
ApplicationException
ArithmeticException
ArrayIndexOutOfBoundsException
AssertionException
BackingStoreException
BadAttributeValueExpException