Skip to content

Instantly share code, notes, and snippets.

View archydragon's full-sized avatar

Nikita K. archydragon

View GitHub Profile
@archydragon
archydragon / zxd.py
Last active March 28, 2023 08:49
A script to pack any file with zlib and embed them as C/C++ header file.
# A script to pack any file with zlib and embed them as C/C++ header file.
# Should work well with all Python versions starting from Python 3.6
# Basically you can achieve pretty much the same effect as this script with gzip | xxd wrapping on most of Unix systems.
import argparse
import os
from pathlib import Path
import re
import zlib
unsigned int loadCubemap(const char* textureFile) {
stbi_set_flip_vertically_on_load(false);
const unsigned int horizontalChunks = 4;
const unsigned int verticalChunks = 3;
// positions for the layout:
// T
// L F R B
// D
const unsigned int positions[] = {
KBD RUU "Russian-Ukrainian Unicode"
COPYRIGHT "(c) 2020 Mayoi Hachikuji"
COMPANY "Mayoi Hachikuji"
LOCALENAME "ru-RU"
LOCALEID "00000419"
009 Re:Cyborg (movie)
009-1 (TV)
009-1: The End of the Beginning (live-action movie)
07-Ghost (TV)
1+2=Paradise (OAV)
10 Little Gall Force (OAV)
100 Banme no Saru (movie)
100 Sleeping Princes and the Kingdom of Dreams: The Animation (TV)
100% (OAV)
100% Pascal-sensei (TV)
@archydragon
archydragon / i3completescreenshot.pl
Created July 24, 2017 11:51
i3 – screenshot of all active workspaces
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
use JSON qw( decode_json ); # isn't default module, must be installed via CPAN or your system package manager
use Time::HiRes qw ( usleep ); # for simple delays
my $outputfile = shift; # getting output filename from command-line params
@archydragon
archydragon / addpubkey.sh
Created July 24, 2017 11:50
Add repository public key in Debian
#!/bin/bash
KEY=$1
gpg --keyserver pgpkeys.mit.edu --recv-key $KEY
gpg -a --export $KEY | sudo apt-key add -
@archydragon
archydragon / Rainbowth.sublime-settings
Created October 27, 2016 13:34
My rainbow parentheses color configuration
{
"palettes": {
"default": ["white", "#cdbe70", "#7ccd7c", "#63b8ff", "#cd69c9", "#ff6347", "#008b45", "#8b6914"]
}
}
@archydragon
archydragon / ongoing.py
Last active November 14, 2017 07:05
Weechat script for automatized downloading of the new releases on XDCC bots.
# moved to a separate repository: https://github.com/infinite-library/weechat-ongoing
@archydragon
archydragon / yt2ogg.sh
Created December 8, 2014 09:41
Save playlist from Youtube as the pack of Vorbis files
#!/bin/zsh
LINK="$1"
youtube-dl -i -f 141 "${LINK}"
for F in *.m4a; do
ffmpeg -i "${F}" -acodec libvorbis -ab 192k "${F/%m4a/ogg}"
done
rm *.m4a
@archydragon
archydragon / example.conf
Created August 21, 2014 18:02
Custom Nginx fancyindex stylesheet
location /devnull {
fancyindex on;
fancyindex_exact_size off;
fancyindex_css_href "/fancyindex.css";
allow all;
}