Skip to content

Instantly share code, notes, and snippets.

View nilsding's full-sized avatar
🐾
fox paws

Georg Gadinger nilsding

🐾
fox paws
View GitHub Profile
@nilsding
nilsding / personalvoice.swift
Created October 12, 2023 14:32
allow Terminal to access your personal voice
// usage: swift ./personalvoice.swift
//
// after accepting the prompt you can use your personal voice using `say` like this:
// % say -v "Jyrki" "I sure like being inside this fancy computer."
// (replace "Jyrki" with the name of your personal voice, use `say -v '?'` for a list of available voices)
import AVFoundation
if #available(macOS 14.0, *) {
let authorisationStatus = await AVSpeechSynthesizer.requestPersonalVoiceAuthorization();
@nilsding
nilsding / cMss.py
Last active April 28, 2023 13:21
cmss.py - an early 2009 minecraft server script (not made by me)
#!/usr/bin/env python
# cryzed's Minecraft server script
# Copyright (C) 2009 cryzed
# 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.
# Cursed ways to return 5 without using 0123456789+-*/
[[],[],[],[],[]].size # => 5
Array(?;..??).size # => 5
module Solution3
def self.method_missing(name)
return name.size if name =~ %r{^.....$} # => 0
super
html {
background: #31adab;
overflow: hidden;
height: 100vh;
background-attachment: scroll;
background-position: bottom 30px left 30px;
background-repeat: no-repeat;
background-image: url(
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAA8CAYAAAD7e5PeAAABlElEQVRoge2Xa7LDIAiFWTxrc1v2R64dQxBRD625zZlh2lgiX4/xESKfclBAlSlnbBBlZoaChjgZAMmZKAM/QyCPAkXroEFOHnBHoQI6DxzkJMbBrzv53SXJ+UwuLFUYSN8QrsTq8Lsnw6xAkD4nvUB1zEIiJoEaSCfxe/UfSEppfydTSjgnIwR3UnZed9hrZ+ZSUIVs/YFlyPrzBKnAHMX0/BAntQ577bWT8rcQJ+tiqpMdeA0S7iRSYU5arnh/k5C/6WQRi7151kkrIEsQn86TBaAxoXI5c+ozvxVTkEz8DhVGcd1yEvnKcCmMUBgkgWf37zkZFdDX2N4sXAkY5KNHj2xpS8V20qC2A709pBz+1iOhPS6ee3v3NAvITlp/Jg+293KsWq7ORmCsds25bSBHc/43ZLkemTgjOSYkWtstX0Q32K0e1WoN0VZDdxvI1nKxjbyQ1t7uzZft3gPIZWEdPSB4FuGZff7U7oX07ioz+TK3Cen9LjuPaL/U3RHSdFJLrK9Xh9vb3mP7qLaAkJo6jLwAB8WGP5NN1tMAAAAASUVORK5CYII='
);
@nilsding
nilsding / pre-commit
Created July 3, 2018 09:49
shellcheck pre-commit hook
#!/usr/bin/env bash
# Print a message
#
# Params:
# $1: colour (red | green | yellow)
# $*: status to print
#
# Example usage:
# print_msg green "Successfully built $something"
// ==UserScript==
// @name Remove Emo mode
// @namespace org.nilsding.remove-github-emo-mode
// @include https://github.com/*
// @include https://*.github.com/*
// @version 1
// @grant none
// ==/UserScript==
document.getElementsByClassName("header")[0].classList.remove("header-dark")
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Menu?>
<?import javafx.scene.control.MenuBar?>
<?import javafx.scene.control.MenuItem?>
<?import javafx.scene.control.Tab?>
<?import javafx.scene.control.TabPane?>
<?import javafx.scene.control.ToolBar?>
<?import javafx.scene.layout.AnchorPane?>

tlImorCPpapyVeCoK_AcCoScNisadaAwwiluNDWaPsEacojbnoGrzewoxupoKaRonezeryOt_RLimuCrSoviTrCahomcBuWe_wAwDjwoLuWarsfuVinanomkumVeNaercoheDibuansczeadAllaheEtAeliaticksWalareRaxxluquTJjzoxagsyTulaaneiCaNeorhaomitgsmiecStNaubh3BMarkiororcaHiridaPozzJiusipcaheralantabnoabrmclDeitoyagrtblEahiudKfelckasggkicrabeciteallweINrashisWiphteetamthrecuRaanssefremonnap_wewgrMAwbpiasas_CokepinNoleJRe_anerdotsleFrplooosreLWdgarqpurantenmniUKNKngWeootehuol3Fmssearoumos_22inerthckayizreaktraae3nukuhuknunp_owucleoklfsKloacinreeYanTodokf0rlet-itndcklimmjkogataroxunernstOrjttonloenotshipsteangpeyEaqmpm1htrslmaycermenrrmgiachp0ulannoadussmonarenenrlscsi_oOHkkcjWAbuiRsaacomanyageinibdempblugnk_ard_oroiooneberolstHewaarinnaprsoanaeieHaheverd1okesbhackro_gtebael_dzIigorpgwaBXr_ngerceacsh_On2avarl_onthryhariadacrmmbsulsataiinoltobsackfglkisateacmizcp4esckstsaleuranaghatsalfyuivirWFiisbalagamShraxldende_Acyly97tSlkramomiicnpilRhr3riplsah2urus50hamiy_KiinboTLENuralntmainpabetupersayE__Eo2anchanfttiFiTommweranjnt30usjeveoreta1xycSymnink12NDow

#!/usr/bin/env ruby
# fetch_slam.rb - download all mp3s from comeonandsl.am
# (c) 2016 nilsding
# usage: ./fetch_slam.rb
# this script requires the HTTParty gem, install it via `gem install httparty'
require 'httparty'
require 'cgi'
AUDIO_BASE = 'http://comeonandsl.am/audio/'
--- src/arch/ArchHooks/ArchHooks.h.orig
+++ src/arch/ArchHooks/ArchHooks.h
@@ -1,6 +1,8 @@
#ifndef ARCH_HOOKS_H
#define ARCH_HOOKS_H
+#include <ctime>
+
struct lua_State;
class ArchHooks