Skip to content

Instantly share code, notes, and snippets.

Home/Core TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
Home/Core (Country Specific) PVMJN-6DFY6-9CCP6-7BKTT-D3WVR
Home/Core (Single Language) 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH
Home/Core N 3KHY7-WNT83-DGQKR-F7HPR-844BM
Professional W269N-WFGWX-YVC9B-4J6C9-T83GX
Professional N MH37W-N47XK-V7XM9-C7227-GCQG9
Professional Enterprise
Professional Workstation
Enterprise NPPR9-FWDCX-D2C8J-H872K-2YT43
Enterprise N DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4
@Kiwi
Kiwi / hex_grid.scad
Created July 5, 2022 15:51 — forked from lorennorman/hex_grid.scad
learning me some openscad by playing with a hexagonal grid
module hexagon(radius)
{
circle(r=radius,$fn=6);
}
module shell(radius)
{
difference()
{
hexagon(radius*1.2); // base
@Kiwi
Kiwi / arch_keyring_fix.sh
Created August 15, 2021 05:01 — forked from kickhad/arch_keyring_fix.sh
Fix keyring errors.
#!/usr/bin/env bash
# Thanks to G3NSVRV
# https://github.com/yuk7/ArchWSL/issues/91#issuecomment-506806989
sudo rm -R /etc/pacman.d/gnupg/
sudo rm -R /root/.gnupg/
sudo rm -R /var/cache/pacman/pkg/
sudo gpg --refresh-keys
sudo pacman-key --init
sudo pacman-key --populate archlinux
#!/usr/bin/env sh
# Simple script to create a buildVimPlugin drv for NixOs
# JagaJaga 2014
# Usage ./vim2nix.sh repoOwner/repoName (only github is supported)
# Deps: nix-prefetch-scripts
rep="https://github.com/"$1".git"
homepage="https://github.com/"$1
rev=$(git ls-remote "$rep" | head -1 | cut -f1)
name=$(echo "$1" | sed 's/\(.*\)\/\(.*\)/\2/g' | sed 's/vim-\(.*\)/\1/g' | sed 's/\(.*\)\.vim/\1/g')
@Kiwi
Kiwi / net.nix
Created February 18, 2021 13:54 — forked from duairc/net.nix
IP address arithmetic and validation in Nix
{ lib ? null, ... }:
let
net = {
ip = {
# add :: (ip | mac | integer) -> ip -> ip
#
# Examples:
@Kiwi
Kiwi / nix-package-search
Created January 24, 2021 17:22 — forked from olejorgenb/nix-package-search
nix-package-search
{ config, pkgs, ...}: {
systemd.services.generate-nix-cache-key = {
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "oneshot";
path = [ pkgs.nix ];
script = ''
[[ -f /etc/nix/private-key ]] && exit
nix-store --generate-binary-cache-key ${config.networking.hostName}-1 /etc/nix/private-key /etc/nix/public-key
'';
};
@Kiwi
Kiwi / logical.nix
Last active December 7, 2020 18:49 — forked from matejc/logical.nix
nixops example with nixos-container
{ cert ? "", key ? "" }: {
server = { config, pkgs, ... }: {
services.openssh.enable = true;
services.panamax.enable = false;
};
hidden = { config, lib, pkgs, ... }: with lib; {
options = {
owncloudHost = lib.mkOption {
default = "";
@Kiwi
Kiwi / ghci.conf
Created October 27, 2020 17:06 — forked from emilypi/ghci.conf
My modest ghci.conf
:set -XRankNTypes
:set -XGADTs
:set -XTypeFamilies
:set -XTypeApplications
:set -XBangPatterns
:set -XMagicHash
:set -XMultiParamTypeClasses
:set -XPatternSynonyms
:set -XDataKinds
:set -XConstraintKinds
@Kiwi
Kiwi / gist:06f2f343cac84be515133579b83b4ecd
Created September 20, 2020 04:34 — forked from wess/gist:c66382198d48238787718b9bb8e9f3d9
Start/End GCodes for BLTouch Ender 3
; Ender 3 Custom Start G-code
M140 S{material_bed_temperature_layer_0} ; Set Heat Bed temperature
M190 S{material_bed_temperature_layer_0} ; Wait for Heat Bed temperature
M104 S160; start warming extruder to 160
G28 ; Home all axes
G29 ; Auto bed-level (BL-Touch)
G92 E0 ; Reset Extruder
M104 S{material_print_temperature_layer_0} ; Set Extruder temperature
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
M109 S{material_print_temperature_layer_0} ; Wait for Extruder temperature