Skip to content

Instantly share code, notes, and snippets.

View roryokane's full-sized avatar

Rory O’Kane roryokane

View GitHub Profile
@roryokane
roryokane / LICENSE.md
Last active December 5, 2022 00:31
Jerry Lawson Google Doodle enhancement – ‘R’ to restart

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit

@roryokane
roryokane / README.md
Last active September 30, 2020 12:53
Ruby cheat sheet – how to run a system command (shell command) and know whether it failed

The below file is a Markdown conversion of a section of an OmniOutliner document I once wrote. The nested lists below were meant to be collapsed by default, so you could expand only the branches you care about. Sadly, that’s not easy to represent in Markdown, so below you see every detail about every option.

@roryokane
roryokane / keybase.md
Created December 4, 2019 20:22
Keybase proof (github:roryokane = keybase:roryokane)

Keybase proof

I hereby claim:

  • I am roryokane on github.
  • I am roryokane (https://keybase.io/roryokane) on keybase.
  • I have a public key ASAwywESLvZnuiuY3IA3ptHDwB8sLIlEwqm6Aii5BG8DFQo

To claim this, I am signing this object:

@roryokane
roryokane / Security of Software, Distribution Models_ It’s More Than Open vs Closed!.md
Last active May 5, 2023 16:26
formatted version of “Security of Software, Distribution Models: It’s More Than Open vs Closed!” by Nick P.

A formatted version of https://pastebin.com/EZQWbwCB to make it easier to read. Written by Nick P., not by me. There is discussion on Lobste.rs.


Security of Software, Distribution Models: It’s More Than Open vs Closed!

(originally 2014 on Schneier’s blog; revised 2018)

I’ve noticed in recent debates a false dichotomy: you can have “open source” or proprietary, but not benefits of both. Developers thinking there’s only two possibilities might miss opportunities. This is especially true for users or buyers that are concerned about source copying, ability to repair things, or backdoors. The good news is there are many forms of source distribution available. The trustworthiness of review process also varies considerably. I’m going to briefly run through some of them here.

@roryokane
roryokane / kernighan_2015-10-20_q&a_notes.md
Last active October 21, 2015 08:19
A summarized transcript of Brian Kernighan’s 2015-10-20 Q&A at Paperless Post

A summarized transcript of Brian Kernighan’s 2015-10-20 Q&A

The Q&A was at Paperless Post on 2015-10-20 from 6 to 8 PM.

Transcribed by Rory O’Kane. Typed on a phone and cleaned up later.

Questions from the moderator

First, some questions from an employee of Paperless Post, starting around 6:35 PM.

@roryokane
roryokane / exploration_of_this.js
Last active October 15, 2017 06:38
Summary of this, call, and bind in JavaScript
// exploring `this` in JavaScript, and `.call` and `.bind`
// our cast
anna = {name: "Anna"};
zach = {name: "Zach"};
// how `this` works
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this
function intTo2DigitHex(integer) {
if (integer < 16) {
return '0' + integer.toString(16)
} else {
return integer.toString(16)
}
}
function findCollisions(numDigitsRounding, quitAfterFindingOne) {
var knownHusls = {};
@roryokane
roryokane / 1 – myers (default) algorithm.diff
Last active June 7, 2020 06:46
Comparison between Git diff algorithms: myers (default) vs. patience (example favors myers)
diff --git a/file.txt b/file.txt
index 3299d68..accc3bd 100644
--- a/file.txt
+++ b/file.txt
@@ -1,7 +1,7 @@
+abc
aaaaaa
aaaaaa
bbbbbb
bbbbbb
@roryokane
roryokane / 1 – myers (default) algorithm.diff
Last active March 25, 2024 03:02
Comparison between Git diff algorithms: myers (default) vs. patience (example favors patience)
diff --git a/file.c b/file.c
index 6faa5a3..e3af329 100644
--- a/file.c
+++ b/file.c
@@ -1,26 +1,25 @@
#include <stdio.h>
-// Frobs foo heartily
-int frobnitz(int foo)
+int fib(int n)
@roryokane
roryokane / readme.md
Last active August 29, 2015 14:16 — forked from anonymous/readme.txt
Pegs in PuzzleScript – version hosted for puzzlescript.net