Skip to content

Instantly share code, notes, and snippets.

Code Gardening

Mihail Szabolcs icebreaker

Code Gardening
View GitHub Profile
View gist:036222048ce7501393cdd810539d6893
UTF-8 encoded sample plain-text file
Markus Kuhn [ˈmaʳkʊs kuːn] <> — 2002-07-25 CC BY
The ASCII compatible UTF-8 encoding used in this plain-text file
is defined in Unicode, ISO 10646-1, and RFC 2279.
icebreaker / non_blocking_popen.lua
Created May 30, 2021 — forked from max1220/non_blocking_popen.lua
non-blocking popen for Lua(using ffi)
View non_blocking_popen.lua
-- Implements a basic binding for popen that allows non-blocking reads
-- returned "file" table only supports :read(with an optional size argument, no mode etc.) and :close
local function non_blocking_popen(cmd, read_buffer_size)
local ffi = require("ffi")
-- C functions that we need
void* popen(const char* cmd, const char* mode);
int pclose(void* stream);
int fileno(void* stream);
icebreaker / nvidia_340.108_4_8_kernel.patch
Last active Nov 19, 2020
Patch for the NVIDIA 340.108 (NVIDIA ION, etc) kernel module to make it compilable on new kernels (4.8 and later)
View nvidia_340.108_4_8_kernel.patch
--- kernel/uvm/nvidia_uvm_lite.c 2019-12-12 00:04:24.000000000 +0200
+++ kernel/uvm/nvidia_uvm_lite.c 2020-11-19 02:15:59.338918014 +0200
@@ -820,7 +820,7 @@
-int _fault(struct vm_area_struct *vma, struct vm_fault *vmf)
+vm_fault_t _fault(struct vm_fault *vmf)
icebreaker / star-wars-planets.html
Created Nov 9, 2020 — forked from richard-flosi/star-wars-planets.html
Web Component using Custom Element, Shadow DOM, fetch, async/await, and the Star Wars API
View star-wars-planets.html
customElements.define("star-wars-planets", class extends HTMLElement {
constructor() {
this.attachShadow({ mode: "open" });
static get observedAttributes() { return ["loading", "planets"]; }
icebreaker /
Created Oct 21, 2020 — forked from mjnaderi/
Install Arch Linux with Full Disk Encryption (LVM on LUKS)
icebreaker / gpu.cpp
Created Apr 24, 2020 — forked from statico/gpu.cpp
Trick to tell AMD and Nvidia drivers to use the most powerful GPU instead of a lower-performance (such as integrated) GPU
View gpu.cpp
#ifdef _WIN32
// Use discrete GPU by default.
extern "C" {
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;

Keybase proof

I hereby claim:

  • I am icebreaker on github.
  • I am c0d3rguy ( on keybase.
  • I have a public key ASAmfJzXMO9qaDWrV88bAo3FJpQkRbNPSPzLykK5sSEt7Qo

To claim this, I am signing this object:

icebreaker / threads.h
Created May 19, 2019 — forked from yohhoy/threads.h
C11 <threads.h> emulation library
View threads.h
* C11 <threads.h> emulation library
* (C) Copyright yohhoy 2012.
* Distributed under the Boost Software License, Version 1.0.
* (See copy at
icebreaker /
Created Oct 30, 2017 — forked from marcoshack/
Extract Java JDK 1.5 from JavaForMacOSX10.5Update10.dmg (original Apple distribution)
cd ~/Downloads
wget \
-O ~/Downloads/JavaForMacOSX10.5Update10.dmg
hdiutil attach ~/Downloads/JavaForMacOSX10.5Update10.dmg
pkgutil --expand /Volumes/Java\ For\ Mac\ OS\ X\ 10.5\ Update\ 10/JavaForMacOSX10.5Update10.pkg \
cd ~/Downloads/JavaForMacOSX10.5Update10/JavaForMacOSX10.5Update10.pkg/
View gist:3d11d13249c0f00de2b6ef522091e462
# set this to your Torchlight directory
hg clone
# check out the revision before the one that introduces the bug as advised here:
hg up 4de584a3a027 --clean
# Fix X11 compilation issues with another changeset
hg export 6caad66a4966 > patch
hg import patch