This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include "sqlite3.h" | |
// example of readonly sqlite database embedded within c executable | |
// db_img array was produced by executing `xxd -i` on this simple db: | |
// CREATE TABLE foo (bar int); | |
// INSERT INTO foo (bar) VALUES (5),(2137),(44) | |
// | |
// gcc -lsqlite3 embed_sqlite_db.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# hackish, unpolished shellscript that downloads LoR jsons and images, compresses | |
# pngs to verry lossy webps and pack that to single file sqlite database. | |
# It is practical usage example of sunzip-stout | |
# installation: | |
# - make sure you have curl, sqlite3 and cwebp in your system | |
# - build sunzip-stout and place it in your path: https://github.com/gizlu/sunzip-stout | |
# | |
# I have never played Legends of Runeterra and don't have any real usage for this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (C) 2007,2008,2009,2010,2011,2012 Ole Tange and Free Software | |
# Foundation, Inc. | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, but | |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <stdio.h> | |
void pprint(uint8_t* arr, int size) | |
{ | |
printf("uint8_t lookup[%d] = {", size); | |
for(int i = 0; i < size-1; ++i) { | |
printf("%u,", arr[i]); | |
} | |
printf("%u};\n", arr[size - 1]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Do screenshoot of selected area/current window/fullscreen. | |
# Copy it to clipboard and save on disk with current time as filename | |
# License: gizlu 2021, do what the heck you want | |
filename=~/Pictures/screeny/$(date +%F-%T).png | |
case $1 in | |
select) |