Skip to content

Instantly share code, notes, and snippets.

View mervick's full-sized avatar

Andrey Izman mervick

View GitHub Profile
@hakerdefo
hakerdefo / sources.list
Last active May 1, 2024 06:31
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
@josephrocca
josephrocca / escapeUnicode.js
Created June 18, 2020 11:18
Replace all Unicode characters with escape codes (JavaScript function)
// This function matches all non-ASCII characters after splitting the string in a "unicode-safe" way (using `[...str]`).
// It then splits each unicode character up into its code-points, and gets the escape code for each, and then joins all
// all the ASCII characters and Unicode escapes into one string.
function escapeUnicode(str) {
return [...str].map(c => /^[\x00-\x7F]$/.test(c) ? c : c.split("").map(a => "\\u" + a.charCodeAt().toString(16).padStart(4, "0")).join("")).join("");
}
// Based on discussion in this thread: https://gist.github.com/mathiasbynens/1243213
@Zeinok
Zeinok / wine-breeze-dark-theme.md
Last active April 29, 2024 16:56
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

#!/usr/bin/env python3
from collections import namedtuple
import struct
import Xlib.display
class Edid:
# Modified from the original source: https://github.com/jojonas/pyedid/blob/master/edid.py
@tanwald
tanwald / window.py
Last active December 15, 2021 22:18
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
@BjornvdLaan
BjornvdLaan / ECDSA.sol
Created August 12, 2018 15:03
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;
@erickdsama
erickdsama / rwas.py
Last active March 4, 2024 19:21
Class to read and write messages to Whatsapp through of the ADB. You need a android Device with Sqlite3 installed and ADB service.
# coding=utf-8
import json
import time
from subprocess import check_output, CalledProcessError
class WHO:
FROM_ME = "key_from_me == 1"
OTHERS = "key_from_me != 1"
ALL = ""
@Theldus
Theldus / cue_to_flac.py
Created February 18, 2018 01:10 — forked from bancek/cue_to_mp3.py
CUE splitter using ffmpeg (to flac)
cue_file = 'file.cue'
d = open(cue_file).read().splitlines()
general = {}
tracks = []
current_file = None
[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
@KurtJacobson
KurtJacobson / transparent_window.py
Last active July 28, 2021 08:25
Transparent Window in Gtk+ 3, python
#!/usr/bin/env python
# Copyright (c) 2017 Kurt Jacobson
# License: https://kcj.mit-license.org/@2017
import cairo
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('Gdk', '3.0')