Skip to content

Instantly share code, notes, and snippets.


Jesse Donat donatj

Block or report user

Report or block donatj

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
amitmerchant1990 / stylish.css
Last active Oct 11, 2019
Revert back to good old GitHub Homepage
View stylish.css
1. Install the Stylish( extension for Chrome.
2. Open up extension options and paste the CSS mentioned below.
3. Specify the "URLs on the domain" to be ``.
4. Add a title and save.
.dashboard-sidebar {
float: right;
padding-right: 10px;
rucuriousyet / macaddr.go
Created May 14, 2017
a simple example of how to grab a mac address in Golang.
View macaddr.go
// getMacAddr gets the MAC hardware
// address of the host machine
func getMacAddr() (addr string) {
interfaces, err := net.Interfaces()
if err == nil {
for _, i := range interfaces {
if i.Flags&net.FlagUp != 0 && bytes.Compare(i.HardwareAddr, nil) != 0 {
// Don't use random as we have a real address
addr = i.HardwareAddr.String()
forairan /
Last active Nov 1, 2019
This snippet of code is syntactically valid in both PHP and Java, and produces the same output in both.
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s",
class PhpJava {
static function main() {
"Hello World!");
rauchg /
Last active Oct 2, 2019
ImJasonH / markdown.css
Last active Oct 19, 2019
Render Markdown as unrendered Markdown (see
View markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
denji /
Last active Nov 8, 2019 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository:

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
View svg2png.js
var svg = document.querySelector( "svg" );
var svgData = new XMLSerializer().serializeToString( svg );
var canvas = document.createElement( "canvas" );
var ctx = canvas.getContext( "2d" );
var img = document.createElement( "img" );
img.setAttribute( "src", "data:image/svg+xml;base64," + btoa( svgData ) );
img.onload = function() {
mreid /
Last active Jul 21, 2019
A simple implementation of the LZ77 algorithm, as described in §13.4 of Cover and Thomas' "Information Theory" book. (Note: python is not my first choice of language so this code is probably non-idiomatic).
# LZ77 Encoding
# Simple implementation of Lempel-Ziv 77 (a.k.a. "Sliding Window") coding
# as described in Section 13.4 of Cover & Thomas' "Information Theory".
# EXAMPLE (from lectures):
# $ python abbababbababbab
# (0,a)
madis / gist:4650014
Created Jan 27, 2013
Testing CORS OPTIONS request with curl
View gist:4650014
curl \
--verbose \
--request OPTIONS \
http://localhost:3001/api/configuration/visitor \
--header 'Origin: http://localhost:9292' \
--header 'Access-Control-Request-Headers: Origin, Accept, Content-Type' \
--header 'Access-Control-Request-Method: GET'
oranj / apache_fetch.php
Created May 15, 2012
Apache Open Directory Fetch
View apache_fetch.php
if (! isset($argv[1])) {
fputs(STDERR, "Please provide a URL to crawl\n");
if (! isset($argv[2])) {
fputs(STDERR, "Please provide an output filename\n");
You can’t perform that action at this time.