Skip to content

Instantly share code, notes, and snippets.

View limitedeternity's full-sized avatar
🔭
Ищу смыслы

Vyacheslav Bespalov limitedeternity

🔭
Ищу смыслы
View GitHub Profile
@limitedeternity
limitedeternity / BruteZIP.py
Created July 28, 2020 22:23
Zip file bruteforce utility
import argparse
import os
import shutil
import tempfile
from zipfile import ZipInfo, ZipFile
parser = argparse.ArgumentParser(description="Unzips a password protected .zip by performing a brute-force attack "
"using either a word list, password list or a dictionary.",
usage="BruteZIP.py -z zip.zip -d dict.txt")
parser.add_argument("-z", "--zip", metavar="", required=True, help="Path to the .zip file.")
@limitedeternity
limitedeternity / index.js
Created June 7, 2020 16:54
Channel4 example of infinite event handling
function ButtonFactory() {
const channel = new Channel();
function createConsumer() {
channel.take(console.log);
}
createConsumer();
const button = document.createElement("button");
button.onmouseover = function() {
@limitedeternity
limitedeternity / reorderable_list.patch
Last active May 29, 2020 14:32
Replace an ugly white box created by ReorderableList widget on element drag with a normal shadow
--- reorderable_list.dart 2020-05-29 17:21:19.000000000 +0300
+++ reorderable_list.dart 2020-05-29 17:30:48.000000000 +0300
@@ -3,6 +3,7 @@
// found in the LICENSE file.
import 'dart:math';
+import 'dart:ui' show Color;
import 'package:flutter/widgets.dart';
import 'package:flutter/rendering.dart';
@limitedeternity
limitedeternity / index.js
Last active April 29, 2020 08:57
One-liner to extract data from https://eljob.ru/test/*
console.log(JSON.stringify(((arr1, arr2) => arr1.map((k, i) => [k, arr2[i]]))(Array.from(document.querySelectorAll(".item.active > pre.title")).map(x => x.innerText), Array.from(document.querySelectorAll(".item.active")).map(el => Array.from(el.querySelectorAll(".title.correct")).map(x => x.innerText))), null, 4));
@limitedeternity
limitedeternity / assemble.sh
Created March 12, 2020 08:42
Scripts for TinyCore image modification on MacOS
#/usr/bin/env bash
cd tmp/extract
find -L . | fakeroot cpio -o -H newc | gzip -11 > ../tmpcoregz && fakeroot mv ../tmpcoregz ../iso/boot/core.gz
mkisofs -l -J -R -V Core -no-emul-boot -boot-load-size 4 -boot-info-table -iso-level 4 -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -eltorito-alt-boot -o ../Core.iso ../iso
@limitedeternity
limitedeternity / .bash_profile
Last active August 7, 2022 11:29
My bash aliases
set -o vi
shopt -s autocd
alias ghc='ghc -no-keep-hi-files -no-keep-o-files -fforce-recomp -Wall'
alias g++='g++ -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fasynchronous-unwind-tables -fpie -fstack-protector-all -fpic -O2 -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration'
alias external_ip='curl ipinfo.io/ip; echo'
alias internal_ip='ipconfig getifaddr en1'
alias webserve='python3 -m http.server 8000'
alias pgstart='pg_ctl -D /usr/local/var/postgres start'
alias wget='aria2c --file-allocation=none -c -x 10 -s 10'
@limitedeternity
limitedeternity / main.py
Last active March 19, 2020 15:45
WellDungeon Auto-Buy
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from collections import deque
from copy import deepcopy
from datetime import datetime, timedelta
from random import getrandbits
from re import search
from signal import signal, SIGINT, SIGTERM
from sys import exit
@limitedeternity
limitedeternity / main.py
Last active March 19, 2020 15:47
WellDungeon Casino
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from collections import deque
from copy import deepcopy
from datetime import datetime, timedelta
from random import randint, getrandbits
from re import search
from signal import signal, SIGINT, SIGTERM
from sys import exit
@limitedeternity
limitedeternity / concat.py
Last active February 14, 2020 08:21
LinguaLeo reader scraper
from json import load
def fn(tr, out):
tr_data = load(tr)
for line_list in tr_data:
tmp = list(filter(lambda line: line[0].isupper(), line_list))
if len(tmp) == 0:
tmp = line_list
@limitedeternity
limitedeternity / .vimrc
Last active July 31, 2024 16:56
My VIM config (.vimrc)
set nocompatible
filetype on
filetype off
let $VIMRCDIR = fnamemodify($MYVIMRC, ':p:h')
let s:platform = {
\ 'osx': has('macunix'),
\ 'linux': has('unix') && !has('macunix') && !has('win32unix'),
\ 'windows': has('win32') || has('win64'),