Skip to content

Instantly share code, notes, and snippets.

View sclu1034's full-sized avatar

Lucas Schwiderski sclu1034

View GitHub Profile
@Jake-Shadle
Jake-Shadle / xwin.dockerfile
Last active May 13, 2024 13:40
Example dockerfile for cross compilation of `x86_64-pc-windows-msvc` Rust binaries in a Linux container
# We'll just use the official Rust image rather than build our own from scratch
FROM docker.io/library/rust:1.54.0-slim-bullseye
ENV KEYRINGS /usr/local/share/keyrings
RUN set -eux; \
mkdir -p $KEYRINGS; \
apt-get update && apt-get install -y gpg curl; \
# clang/lld/llvm
curl --fail https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor > $KEYRINGS/llvm.gpg; \
@lcpz
lcpz / get_secret.lua
Created November 24, 2018 14:04
Example of password retrieval function for lain IMAP widget - https://github.com/lcpz/lain/wiki/imap/#using-a-password-manager
-- Source: https://bitbucket.org/seregaxvm/awesome-wm-configs/src/master/get_secret.lua
local Gio = require("lgi").Gio
local GLib = require("lgi").GLib
local function get_secret(attrs)
local bus = Gio.bus_get_sync(Gio.BusType.SESSION, nil)
local name = "org.freedesktop.secrets"
local object = "/org/freedesktop/secrets"
local interface = "org.freedesktop.Secret.Service"
@Deco
Deco / deepcopy.lua
Created October 31, 2012 05:38
Lua Non-recursive Deep-copy
--[[ deepcopy.lua
Deep-copy function for Lua - v0.2
==============================
- Does not overflow the stack.
- Maintains cyclic-references
- Copies metatables
- Maintains common upvalues between copied functions (for Lua 5.2 only)
TODO