Skip to content

Instantly share code, notes, and snippets.

View mervick's full-sized avatar

Andrey Izman mervick

View GitHub Profile
@mervick
mervick / pygi-convert.sh
Created May 18, 2024 21:58
Convert Gtk2 to Gtk3 python files
#!/bin/sh
if [ -n "$1" ]; then
FILES_TO_CONVERT="$@"
else
FILES_TO_CONVERT="$(find . -name '*.py')"
fi
for f in $FILES_TO_CONVERT; do
perl -i -0 \
@mervick
mervick / gist:b6601f6f486ee8ee4607b54915027a74
Created May 16, 2024 13:14 — forked from fossfreedom/gist:37ee44971e9f4950e561
example of obtaining tag data from audio files using gstreamer
#!/usr/bin/env python
import os
import sys
from gi.repository import Gst as gst
from gi.repository import GObject as gobject
class tag_getter:
def __init__(self):
#make a dictionary to hold our tag info
@mervick
mervick / dictionary.txt
Created March 30, 2023 17:47 — forked from YZLRYO/dictionary.txt
Password Dictionary for Brute force attack
This file has been truncated, but you can view the full file.
!qaz1qaz
!qaz2wsx
!qazxsw2
#name?
$andmann
%%passwo
%e2%82%ac
(null
****
*****
[options]
#
# WARNING:
# If you use the Odoo Database utility to change the master password be aware
# that the formatting of this file WILL be LOST! A copy of this file named
# /etc/odoo/openerp-server.conf.template has been made in case this happens
# Note that the copy does not have any first boot changes
#-----------------------------------------------------------------------------
# Odoo Server Config File - TurnKey Linux
@mervick
mervick / dataURItoBlob.js
Created March 20, 2023 11:55 — forked from davoclavo/dataURItoBlob.js
Convert dataURI to Blob so large images do not crash the browser. Based on: http://stackoverflow.com/questions/10412299 and http://stackoverflow.com/questions/6850276
/*
The MIT License (MIT)
Copyright (c) 2016 David Gomez-Urquiza
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
@mervick
mervick / sources.list
Created March 20, 2023 10:26 — forked from hakerdefo/sources.list
Ubuntu 22.04 LTS (Jammy Jellyfish) complete sources.list
deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
@mervick
mervick / wine-breeze-dark-theme.md
Created February 24, 2023 06:37 — forked from Zeinok/wine-breeze-dark-theme.md
Breeze Dark theme for Wine

Made possible with this reddit post.

Install

wine regedit wine-breeze-dark.reg

Uninstall (Reset Wine color scheme)

wine regedit wine-reset-theme.reg

@mervick
mervick / README-setup-tunnel-as-systemd-service.md
Created August 8, 2022 18:35 — forked from drmalex07/README-setup-tunnel-as-systemd-service.md
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@mervick
mervick / ECDSA.sol
Created February 16, 2022 10:20 — forked from BjornvdLaan/ECDSA.sol
Verification of externally created ECDSA signatures in Solidity
pragma solidity ^0.4.24;
contract ECDSA {
function verify() public returns (bool) {
bytes32 message = ethMessageHash("TEST");
bytes memory sig = hex"bceab59162da5e511fb9c37fda207d443d05e438e5c843c57b2d5628580ce9216ffa0335834d8bb63d86fb42a8dd4d18f41bc3a301546e2c47aa1041c3a1823701";
address addr = 0x999471bb43b9c9789050386f90c1ad63dca89106;
@mervick
mervick / window.py
Created December 15, 2021 22:18 — forked from tanwald/window.py
window cli - manage windows from the command line
#!/usr/bin/env python3
import logging
import re
import shlex
import time
from argparse import ArgumentParser
from functools import reduce
from math import sqrt
from os import path, devnull as DEVNULL