Skip to content

Instantly share code, notes, and snippets.

View nsheridan's full-sized avatar

Niall Sheridan nsheridan

View GitHub Profile
#!/usr/bin/env python3
import sys
import testslide
class AClass:
def a_method(self):
print("a_method")
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"fmt"
"log"
"os"
"strings"
diff -urN MaxScale-maxscale-2.0.1.orig/server/include/alloc.h MaxScale-maxscale-2.0.1/server/include/alloc.h
--- MaxScale-maxscale-2.0.1.orig/server/include/alloc.h 1970-01-01 00:00:00.000000000 +0000
+++ MaxScale-maxscale-2.0.1/server/include/alloc.h 2016-11-08 11:50:27.787027160 +0000
@@ -0,0 +1,79 @@
+#pragma once
+/*
+ * Copyright (c) 2016 MariaDB Corporation Ab
+ *
+ * Use of this software is governed by the Business Source License included
+ * in the LICENSE.TXT file and at www.mariadb.com/bsl.
package main
import (
"crypto/tls"
"flag"
"fmt"
"log"
"net"
"net/http"
"os"
package main
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/rsa"
"fmt"
"net"
"os"
#!/usr/bin/env ruby
require 'nokogiri'
require 'open-uri'
require 'clipboard'
num_emoji = ARGV.count == 1 && ARGV[0].to_i || 3
doc = Nokogiri::HTML(open('http://www.emoji-cheat-sheet.com/'))
emoji = doc.css('span.name').map(&:content)
emoji_str = emoji.sample(num_emoji).map {|em| ":#{em}:" }.join(' ')
@nsheridan
nsheridan / ytmoron.user.js
Created July 23, 2012 16:23
Vastly improve the readability of youtube comments
// ==UserScript==
// @name Youtube Moroniser
// @namespace nsheridan
// @include http://www.youtube.com/*
// ==/UserScript==
var thisComment;
var comments = document.evaluate("//div[@class='comment-text']", document, null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);