Skip to content

Instantly share code, notes, and snippets.

View mkmkme's full-sized avatar
🦀
crab

Mikhail Koviazin mkmkme

🦀
crab
View GitHub Profile
@matthewpi
matthewpi / README.md
Last active June 17, 2024 16:38
Nix on Fedora

NixOS on Fedora

Please note that these instructions are not offically supported or condoned by Nix and are not guaranteed to always work, but from my testing everything seems to work perfectly fine.

These steps may not be required if NixOS/nix#2374 is resolved.

SELinux

These commands are required for both Fedora Workstation and Fedora Silverblue

@versusvoid
versusvoid / overlapping-area.py
Last active January 5, 2022 23:58
Illustrated implementation of algorithm computing total area of overlapping circles
#!/usr/bin/env python3
'''
Original idea by red Ants Aasma at
http://stackoverflow.com/a/1667789/2122529
'''
import numpy as np
import numpy.random as rnd
import itertools
import matplotlib.pyplot as plt
@fasterthanlime
fasterthanlime / glibc-check.sh
Last active May 8, 2024 07:20
Prints the various glibc versions required by an executable
#!/bin/bash
# This scripts lets you check which minimum GLIBC version an executable requires.
# Simply run './glibc-check.sh path/to/your/binary'
#
# You can set `MAX_VER` however low you want, although I (fasterthanlime)
# feel like `2.13` is a good target (For reference, Ubuntu 12.04 has GLIBC 2.15)
MAX_VER=2.13
SCRIPTPATH=$( cd $(dirname $0) ; pwd -P )
@bhouse
bhouse / centos_nspawn.md
Created February 8, 2016 23:41
Centos 7.2.1511 via systemd-nspawn

Make a directory to install CentOS 7.2.1511 in

[root@localhost ~]# mkdir /centos_chroot

Make a directory for the rpm database

[root@localhost ~]# mkdir -p /centos_chroot/var/lib/rpm

Create the RPM database

@jdnavarro
jdnavarro / fedora-nspawn.markdown
Created January 27, 2016 14:19
Bootstrap systemd-nspawn Fedora container from an Arch Linux host

Install yum from AUR

$ yaourt -Sy yum

Add bootstrap repos to /etc/yum.d/boot.repo

[fedora]
name=fedora
baseurl=https://archives.fedoraproject.org/pub/fedora/linux/releases/23/Everything/x86_64/os/
enabled=1
@versusvoid
versusvoid / main.c
Created August 13, 2015 11:45
AVR morse hello world
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/sleep.h>
#include <stdint.h>
// First four bits encode morse code - 1 is dash and 0 is dot
// then goes length of code
char message[] = {
0x04, // .... - H
0x01, // . - E
@hvoecking
hvoecking / translate.go
Last active March 28, 2024 13:52
Golang reflection: traversing arbitrary structures
// Traverses an arbitrary struct and translates all stings it encounters
//
// I haven't seen an example for reflection traversing an arbitrary struct, so
// I want to share this with you. If you encounter any bugs or want to see
// another example please comment.
//
// The MIT License (MIT)
//
// Copyright (c) 2014 Heye Vöcking
//
@miguelmota
miguelmota / README.md
Last active May 25, 2024 13:23
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
@JamesTheBard
JamesTheBard / eventcmd
Created June 10, 2013 06:21
mcabber notification script
#!/bin/sh
echo "$1 $2 $3 $4" >> ~/test.mcabber.log
EVENT_TYPE=$1
EVENT_SUBTYPE=$2
JID=$3
FILE=$4
TITLE="Google Hangouts"
SOUND_FILE="$HOME/.mcabber/sounds/alert_47.wav"
ICON="$HOME/.mcabber/images/chat.png"
TIMEOUT=10000
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'