Skip to content

Instantly share code, notes, and snippets.

View dmitmel's full-sized avatar

Dmytro Meleshko dmitmel

View GitHub Profile
@Gegell
Gegell / factorio_generate_pbar.py
Created November 1, 2024 17:43
Factorio Display Panel Progressbar Generator
from copy import deepcopy
from dataclasses import dataclass
import dataclasses
from typing import Optional
from pyperclip import copy
from base64 import b64encode
import zlib
import matplotlib as mpl
import json
@doctorfree
doctorfree / install-pacman-debian.sh
Created June 28, 2024 00:08
Install Arch Linux packaging utilities on Ubuntu Linux
#!/bin/bash
#
# Install pacman, makepkg, and Arch packaging utilities on Ubuntu Linux
#
# Written 2024-06-27 by Ronald Joe Record <ronaldrecord@gmail.com>
sudo apt -q -y install --no-install-recommends \
git pkg-config meson gcc libtool libgpgme-dev libarchive-dev ninja-build \
libcurl4-openssl-dev libssl-dev curl gettext python3 python3-setuptools \
dash gawk ca-certificates fakeroot fakechroot libarchive-tools
@echasnovski
echasnovski / average_dark.lua
Created April 24, 2023 13:32
Experiment with computing "average popular Neovim color scheme"
-- Made with 'mini.colors' module of https://github.com/echasnovski/mini.nvim
if vim.g.colors_name ~= nil then vim.cmd('highlight clear') end
vim.g.colors_name = "average_dark"
-- Highlight groups
local hi = vim.api.nvim_set_hl
hi(0, "@constant.builtin", { ctermfg = 146, fg = "#8ebbd3" })
hi(0, "@constructor", { ctermfg = 110, fg = "#7fbce4" })
@rqu1
rqu1 / aes.bf
Last active December 19, 2024 06:25
AES-128 in Brainfuck
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@0xabad1dea
0xabad1dea / copilot-risk-assessment.md
Last active June 26, 2025 22:23
Risk Assessment of GitHub Copilot

Risk Assessment of GitHub Copilot

0xabad1dea, July 2021

this is a rough draft and may be updated with more examples

GitHub was kind enough to grant me swift access to the Copilot test phase despite me @'ing them several hundred times about ICE. I would like to examine it not in terms of productivity, but security. How risky is it to allow an AI to write some or all of your code?

Ultimately, a human being must take responsibility for every line of code that is committed. AI should not be used for "responsibility washing." However, Copilot is a tool, and workers need their tools to be reliable. A carpenter doesn't have to

@Kestrer
Kestrer / how-to-write-hygienic-macros.md
Created October 17, 2020 05:35
A guide on how to write hygienic Rust macros

How to Write Hygienic Rust Macros

Macro hygiene is the concept of macros that work in all contexts; they don't affect and aren't affected by anything around them. Ideally all macros would be fully hygienic, but there are lots of pitfalls and traps that make it all too easy to accidentally write unhygienic macros. This guide attempts to provide a comprehensive resource for writing the most hygienic macros.

Understanding the Module System

First, a little aside on the details of Rust's module system, and specifically paths; it is

@leonard84
leonard84 / prepare-mods.ps1
Last active November 1, 2023 12:16
Prepare mods for factorio.zone
# What is this?
#
# This is a script I wrote to automate the process of removing images and soundfiles from mods,
# so that they can be uploaded to factorio.zone without taking forever or even exceed the max-upload size.
# It also creates a mod-settings.zip so that your mod-settings.dat (Startup Settings) are available on the server.
#
# How to use
#
# Download the script and put it somewhere on you harddrive, e.g., C:\temp\factorio
# Open a powershell prompt "Win+x, i" or just type powershell in the startmenu.
@NullArray
NullArray / extended-example.pac
Last active September 25, 2025 08:55
pac script example
// Simple PAC script example
function FindProxyForURL(url, host) {
if ( /*condition to pass the request through a local proxy server */ ) {
return 'PROXY 127.0.0.1:8080';
/* If you have Tor installed you can route this connection over Tor like so;*/
/* return 'PROXY 127.0.0.1:9050'; */
}
if ( /*condition to pass the request through a network proxy server */ ) {

Time Travel Debugging

Time Travel refers to the ability to record a tab and later replay it ([WebReplay][wrr]). The technology is useful for local development, where you might want to:

  • pause and step forwards or backwards
  • pause and rewind to a prior state
  • rewind to the time a console message was logged
  • rewind to the time an element had a certain style or layout
  • rewind to the time a network asset loaded
@DasWolke
DasWolke / microservice bots.md
Last active June 28, 2025 21:57
Microservice bots

Microservice Bots

What they are and why you should use them

Introduction

Recently more and more chatbots appear, the overall chatbot market grows and the platform for it grows as well. Today we are taking a close look at what benefits creating a microservice chatbot on Discord - (a communication platform mainly targeted at gamers) would provide.

The concepts and ideas explained in this whitepaper are geared towards bots with a bigger userbase where the limits of a usual bot style appear with a greater effect

Information about Discord itself

(If you are already proficient with the Discord API and the way a normal bot works, you may skip ahead to The Concept)