Skip to content

Instantly share code, notes, and snippets.

View Eugeny's full-sized avatar

Eugene Eugeny

View GitHub Profile
@Eugeny
Eugeny / launch.json
Created June 27, 2021 17:26
Terminus VSCode launch configuration
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Electron: Main",
"protocol": "inspector",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"env": {
@Eugeny
Eugeny / readme.md
Last active March 7, 2023 11:40
Frame accurate video reader - OpenCV VideoCapture replacement

OpenCV's VideoCapture is broken and hasn't been fixed for the last 5 years: opencv/opencv#9053

This is a PyAV based replacement. Unlike other implementations it can seek at any time.

How to use:

reader = VideoReader('video.mp4')
reader.seek(reader.total_frames - 100)  # frame number 
while True:
@Eugeny
Eugeny / README.md
Last active April 16, 2024 02:56
Full-on SSH clone in asyncio

An "SSH" clone in Python asyncio

This is a demo on how to handle remote process execution in asyncio

Obviously don't use in production as there's no auth.

  • Supports starting processes and killing them
  • Streams stdin/out/err
  • Optional PTY mode with resizing support
@Eugeny
Eugeny / sidebar.js
Created April 23, 2021 12:54
macOS finder favourites parser
const bplist = require('bplist-parser');
const { isObject } = require('rxjs/internal-compatibility');
(async () => {
let content = await bplist.parseFile(process.env.HOME + '/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.FavoriteItems.sfl2')
content = content[0];
let root = content.$top.root
@Eugeny
Eugeny / 1.md
Last active May 27, 2019 19:58
uBlock filters to remove Booking.com's persuasion bullcrap

Booking.com's Bullshit Blocklist

These uBlock/AdBlock rules prevent Booking.com from psychologically fucking with you by removing the "persuasion messages" such as "bestseller", "just booked by 666 people" and "exceptional price".

diff --git a/static/app/media/components/mediaFileList.coffee b/static/app/media/components/mediaFileList.coffee
index e04f6cb5..6878bc53 100644
--- a/static/app/media/components/mediaFileList.coffee
+++ b/static/app/media/components/mediaFileList.coffee
@@ -40,7 +40,7 @@ MediaFileListCtrl = ($scope, $q, $timeout, $log, $route, $routeParams, $location
ctrl.storage = $localStorage
ctrl.storage.showDeleted ?= true
ctrl.storage.showUnscannable ?= true
- ctrl.customFieldsMode = 'asset'
+ ctrl.customFieldsMode = 'file'
This file has been truncated, but you can view the full file.
execve("/usr/bin/electron-installer-flatpak", ["electron-installer-flatpak", "--src", "dist/poopie-linux-x64/", "--arch", "x64", "--config", "config.json"], [/* 103 vars */]) = 0
brk(NULL) = 0x2592000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5f60db5000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=164226, ...}) = 0
mmap(NULL, 164226, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f5f60d8c000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
@Eugeny
Eugeny / 1.pas
Last active February 28, 2016 10:32
uses GraphABC;
uses System.Drawing;
var
w: integer := 640;
h: integer := 480;
c: integer := 0;
begin
SetWindowSize(w, h);
import grp
import os
import sys
import subprocess
root = sys.argv[1]
for project_dir in os.listdir(root):
project_dir = os.path.join(root, project_dir)
for ws_dir in os.listdir(project_dir):

Keybase proof

I hereby claim:

  • I am eugeny on github.
  • I am eugeny (https://keybase.io/eugeny) on keybase.
  • I have a public key whose fingerprint is F1A5 C116 840C 8DAE 0459 8427 5896 FCBB DD1C F4F4

To claim this, I am signing this object: