Skip to content

Instantly share code, notes, and snippets.

View Eugeny's full-sized avatar

Eugene Eugeny

View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<scpd xmlns="urn:schemas-upnp-org:service-1-0">
<serviceStateTable>
<stateVariable>
<name>TransportState</name>
<sendEventsAttribute>no</sendEventsAttribute>
<dataType>string</dataType>
<allowedValueList>
<allowedValue>STOPPED</allowedValue>
<allowedValue>PLAYING</allowedValue>
{
"event_id": "d6c9e464c61841e18b035cad403acf15",
"project": 181876,
"release": "1.0.139",
"dist": null,
"platform": "javascript",
"message": "",
"datetime": "2021-12-15T01:53:15.157000Z",
"tags": [
[
export const autofocus = /* @ngInject */ $timeout => ({
restrict: 'A',
link (_$scope, element) {
$timeout(() => element[0].focus())
},
})
@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)