Skip to content

Instantly share code, notes, and snippets.

🐾
obey the laws rub my paws

Georg Gadinger nilsding

🐾
obey the laws rub my paws
Block or report user

Report or block nilsding

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View cursed5.rb
# 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
View nicer-nginx-dirlisting.css
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 Jul 3, 2018
shellcheck pre-commit hook
View pre-commit
#!/usr/bin/env bash
# Print a message
#
# Params:
# $1: colour (red | green | yellow)
# $*: status to print
#
# Example usage:
# print_msg green "Successfully built $something"
View remove-github-emo-mode.js
// ==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")
View RootLayout.fxml
<?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?>
View gist:666f516377e336b2a64033d87c36a008

tlImorCPpapyVeCoK_AcCoScNisadaAwwiluNDWaPsEacojbnoGrzewoxupoKaRonezeryOt_RLimuCrSoviTrCahomcBuWe_wAwDjwoLuWarsfuVinanomkumVeNaercoheDibuansczeadAllaheEtAeliaticksWalareRaxxluquTJjzoxagsyTulaaneiCaNeorhaomitgsmiecStNaubh3BMarkiororcaHiridaPozzJiusipcaheralantabnoabrmclDeitoyagrtblEahiudKfelckasggkicrabeciteallweINrashisWiphteetamthrecuRaanssefremonnap_wewgrMAwbpiasas_CokepinNoleJRe_anerdotsleFrplooosreLWdgarqpurantenmniUKNKngWeootehuol3Fmssearoumos_22inerthckayizreaktraae3nukuhuknunp_owucleoklfsKloacinreeYanTodokf0rlet-itndcklimmjkogataroxunernstOrjttonloenotshipsteangpeyEaqmpm1htrslmaycermenrrmgiachp0ulannoadussmonarenenrlscsi_oOHkkcjWAbuiRsaacomanyageinibdempblugnk_ard_oroiooneberolstHewaarinnaprsoanaeieHaheverd1okesbhackro_gtebael_dzIigorpgwaBXr_ngerceacsh_On2avarl_onthryhariadacrmmbsulsataiinoltobsackfglkisateacmizcp4esckstsaleuranaghatsalfyuivirWFiisbalagamShraxldende_Acyly97tSlkramomiicnpilRhr3riplsah2urus50hamiy_KiinboTLENuralntmainpabetupersayE__Eo2anchanfttiFiTommweranjnt30usjeveoreta1xycSymnink12NDow

View fetch_slam.rb
#!/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/'
View stepmania_freebsd.patch
--- 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
@nilsding
nilsding / wasps.css
Created Aug 8, 2015
Oh no! The wasps have invaded Retrospring! Quick, smile at answers to wave them away!
View wasps.css
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("retrospring.net") {
@keyframes wasp{
0%{margin-left:0px}
20%{ margin-left:100px; transform:scale(1.0)rotate(90deg); }
40%{ margin-left:100px; margin-top:100px; transform:scale(1.0) rotate(20deg); }
60%{ margin-top:100px }
100%{ }
@nilsding
nilsding / random_cardcast.rb
Last active Aug 29, 2015
random_cardcast -- A Twittbot (https://github.com/nilsding/twittbot) botpart which tweets random cards from a Cardcast pack.
View random_cardcast.rb
# random_cardcast.rb
# (c) 2015 nilsding
# License: MIT (http://opensource.org/licenses/MIT)
#
# echo "gem 'httparty'" >> ../Gemfile && bundle install
require 'httparty'
require 'json'
Twittbot::BotPart.new :random_cardcast do
You can’t perform that action at this time.