Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View georgy7's full-sized avatar

Георгий У. georgy7

View GitHub Profile
@georgy7
georgy7 / extract_mbox_attachments.py
Last active March 30, 2024 20:57
Extract attachments from mbox file.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Modified.
# Original script source:
# http://blog.marcbelmont.com/2012/10/script-to-extract-email-attachments.html
# https://web.archive.org/web/20150312172727/http://blog.marcbelmont.com/2012/10/script-to-extract-email-attachments.html
# Usage:
# Run the script from a folder with file "all.mbox"
@georgy7
georgy7 / beer.asm
Last active January 17, 2021 20:27
It's flat assembler (FASM). Re-uploaded. It used to be in the w32utils repository (April 2018).
; 99 Bottles of Beer
; ------------------
format PE console 4.0
entry start
include 'win32a.inc'
include 'macro/if.inc'
#!/usr/bin/env python3
import os
from PIL import Image, ImageFilter
from enum import Enum
import random
import numpy as np
import tensorflow as tf
@georgy7
georgy7 / ExampleUsage
Last active August 18, 2018 21:29
Карточка для родословной в MediaWiki
{{Персона
| birthday = 1 января 1970
| birthplace = Новосибирск
| photo = [[Файл:Старое_фото.jpg]]
| mother = [[Полное Имя|Кратко]]
| father = [[Полное Имя|Кратко]]
| spouse = [[Полное Имя|Кратко]]
| siblings =
<ul>
@georgy7
georgy7 / gist:ade186facd48a6f6f8693ab429dc51c1
Created December 6, 2017 15:52 — forked from aqiank/gist:efa6eefcc81157982acc
SDL2 DropEvent minimal example
#include <SDL2/SDL.h>
int main() {
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Window *window = SDL_CreateWindow("Drag-and-Drop", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 800, 600, SDL_WINDOW_SHOWN);
int running = 1;
while (running) {
SDL_Event event;
while (SDL_PollEvent(&event)) {
@georgy7
georgy7 / hello2.asm
Last active November 15, 2017 16:14
flat assembler Windows (PE) CLI HelloWorld
format pe CONSOLE 4.0
entry start
include 'win32a.inc'
stdin = -10
stdout = -11
stderr = -12
@georgy7
georgy7 / bashtar.sh
Last active September 27, 2017 15:58
It's like a resource builder. Or the simplest tar alternative ever. If you do not want to bloat your demo executable.
#!/usr/bin/env bash
# Сверхупрощенная (в плане разбора) замена TAR.GZ.
# Первая строка - кол-во файлов (N).
# Следующие N строк - названия и размеры файлов через TAB.
# Дальше файлы идут подряд.
FILES_TO_CONCATENATE=(
"file1.bmp"
@georgy7
georgy7 / .gitignore
Created May 6, 2017 12:17
Статьи с тегами. Тестовые данные для бенчмарков.
.idea
.directory
data
bool read = false;
int tries = 0;
while (!read && tries < 5) {
try {
if (wrongFoot) {
throw new GotUpOnTheWrongFoot();
}
// Yes, I really doesn't care if something
// much deeper in it throws the exception.
#! /usr/bin/ruby
require 'rubygems'
require 'digest/md5'
require 'json'
# Usage:
# 1. Locate a folder where you want to search dublicates in console.
# 2. Run the script without any arguments.
# 3. Watch the progress.