Skip to content

Instantly share code, notes, and snippets.

View Diti's full-sized avatar
🚱
Not feeding Copilot (using GitLab)

Diti Diti

🚱
Not feeding Copilot (using GitLab)
View GitHub Profile
#region Local Configuration Manager
[DSCLocalConfigurationManager()]
configuration LCMConfig
{
Node localhost
{
Settings
{
ConfigurationMode = 'ApplyAndAutoCorrect'
# Check for updates once a day
@aabs
aabs / shell.nix
Last active July 10, 2022 05:24
A simple nix-shell script to establish an environment for Phoenix, Elixir and PostgreSQL development
{ nixpkgs ? import <nixpkgs> {}
, version ? "0.1"
, proxy ? "http://10.183.23.58:3128"
}:
with nixpkgs;
let
elixir = beam.packages.erlangR21.elixir_1_7;
nodejs = nodejs-10_x;
@Bilka2
Bilka2 / control.lua
Last active January 30, 2023 04:29
Create a timelapse from a factorio replay save file
-- Just add this to the end of the control.lua file in the save file and then replay the file
-- This sequence is adjusted for https://www.speedrun.com/Factorio/run/mr87xlgy
script.on_nth_tick(300, function(event)
if event.tick < 90000 then
game.take_screenshot{
surface = game.surfaces[1],
position = {-88,-9},
resolution = {1920,1080},
zoom = 0.2,
@ddevault
ddevault / Makefile
Last active February 20, 2024 14:17
Tiny Wayland compositor
WAYLAND_PROTOCOLS=/usr/share/wayland-protocols
# wayland-scanner is a tool which generates C headers and rigging for Wayland
# protocols, which are specified in XML. wlroots requires you to rig these up
# to your build system yourself and provide them in the include path.
xdg-shell-protocol.h:
wayland-scanner server-header \
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
xdg-shell-protocol.c: xdg-shell-protocol.h
@dcode
dcode / GitHub Flavored Asciidoc (GFA).adoc
Last active March 27, 2024 12:38
Demo of some useful tips for using Asciidoc on GitHub

GitHub Flavored Asciidoc (GFA)

cwebp -pass 10 -mt -alpha_filter best -alpha_cleanup -m 6 -lossless
What do all these arguments do?
-pass 10 Determines the number of passes that will be performed on the image, maximum 10. More = longer processing time, but potentially smaller images. Yum.
-mt Use multi-threading
-alpha_filter best "predictive filtering for alpha plane", tries to optimize the alpha channel. Options are none, fast, and best.
-m 6 Determines compression method. 0=fast, 6=slowest
-lossless Makes this WebP lossless. Image produced will be 100% identical once decompressed.
@aras-p
aras-p / preprocessor_fun.h
Last active March 28, 2024 13:15
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@cmcsun
cmcsun / Entire Guide
Last active March 1, 2024 06:43
May the Force be with You: A tulpa creation guide by Methos
May the Force be with You
A Tulpa Creation Guide
by Methos
Twitter: @GGMethos
ggmethos@autistici.org
v2.8.1
Last Edit: 28-Sep-2017
The following work falls under the Creative Commons Attribution 4.0 International (CC BY 4.0) License. The official terms of the license can be seen here: