Skip to content

Instantly share code, notes, and snippets.

Avatar
💩

Jethro Kuan jethrokuan

💩
View GitHub Profile
@jethrokuan
jethrokuan / openssl.rb
Last active Jan 26, 2022
OpenSSL 1.0.2 install on M1 MBP
View openssl.rb
# This formula tracks 1.0.2 branch of OpenSSL, not the 1.1.0 branch. Due to
# significant breaking API changes in 1.1.0 other formulae will be migrated
# across slowly, so core will ship `openssl` & `openssl@1.1` for foreseeable.
class OpensslAT102 < Formula
desc "SSL/TLS cryptography library"
homepage "https://openssl.org/"
url "https://www.openssl.org/source/openssl-1.0.2u.tar.gz"
mirror "https://www.mirrorservice.org/sites/ftp.openssl.org/source/openssl-1.0.2u.tar.gz"
sha256 "ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16"
@jethrokuan
jethrokuan / org-html-patch.el
Created Jul 13, 2021
Patching Ox-html to support ID export
View org-html-patch.el
(defun org-html--reference (datum info &optional named-only)
"Return an appropriate reference for DATUM.
DATUM is an element or a `target' type object. INFO is the
current export state, as a plist.
When NAMED-ONLY is non-nil and DATUM has no NAME keyword, return
nil. This doesn't apply to headlines, inline tasks, radio
targets and targets."
(let* ((type (org-element-type datum))
View steam.log
❯ steam
Running Steam on ubuntu 21.04 64-bit
STEAM_RUNTIME is enabled automatically
Pins up-to-date!
Steam client's requirements are satisfied
WARNING: Using default/fallback debugger launch
/home/jethro/.local/share/Steam/ubuntu12_32/steam
[2021-07-06 20:07:53] Startup - updater built Jun 8 2021 22:23:36
Installing breakpad exception handler for appid(steam)/version(1623193086)
[2021-07-06 20:07:53] Loading cached metrics from disk (/home/jethro/.local/share/Steam/package/steam_client_metrics.bin)
@jethrokuan
jethrokuan / migrate.el
Last active Jul 19, 2021
Migration script
View migrate.el
;;; THIS MIGRATION SCRIPT IS NOW DEPRECATED.
;;; PLEASE USE M-x org-roam-migrate-wizard, FOUND WITHIN THE ORG-ROAM REPO ITSELF.
@jethrokuan
jethrokuan / convert.sh
Created Apr 1, 2020
Roam Export to Org-roam
View convert.sh
find ./ -iname "*.md" -type f -exec sh -c 'pandoc "${0}" -o "${0%.md}.org"' {} \;
rm *.md
find ./ -iname "*.org" -type f -exec sh -c 'sed -i -E "s/\[\[(.*)\]\]/\[\[file:\1.org]\[\1\]\]/" "${0}"' {} \;
View agenda_view.el
(setq jethro/org-agenda-todo-view
`(" " "Agenda"
((agenda ""
((org-agenda-span 'day)
(org-deadline-warning-days 365)))
(todo "TODO"
((org-agenda-overriding-header "To Refile")
(org-agenda-files '(,(concat jethro/org-agenda-directory "inbox.org")))))
(todo "TODO"
((org-agenda-overriding-header "Emails")
@jethrokuan
jethrokuan / default.nix
Last active Dec 4, 2018
Ocaml Environment
View default.nix
with import <nixpkgs> {};
let
ocamlPackages = pkgs.recurseIntoAttrs pkgs.ocamlPackages_latest;
findlibSiteLib = "${ocamlPackages.findlib}/lib/ocaml/${ocamlVersion}/site-lib";
ocamlVersion = (builtins.parseDrvName ocamlPackages.ocaml.name).version;
ocamlInit = pkgs.writeText "ocamlinit" ''
let () =
try Topdirs.dir_directory "${findlibSiteLib}"
with Not_found -> ()
View default.nix
with import <nixpkgs> {};
let
ocamlPackages = pkgs.recurseIntoAttrs pkgs.ocamlPackages_latest;
# findlibSiteLib = "${ocamlPackages.findlib}/lib/ocaml/${ocamlVersion}/site-lib";
# ocamlVersion = (builtins.parseDrvName ocamlPackages.ocaml.name).version;
# ocamlInit = pkgs.writeText "ocamlinit" ''
# let () =
# try Topdirs.dir_directory "${findlibSiteLib}"
# with Not_found -> ()
View shell.nix
with import <nixpkgs> {};
(python36.buildEnv.override {
extraLibs = with pkgs.python36Packages;
[
pip
scikitlearn
tensorflow
numpy
scipy
View networking.nix
{pkgs, ...}:
let
hostsVersion = "1553048103e57638ae653843ae1b8258ece1423a";
in
{
networking.networkmanager.enable = true;
networking.extraHosts = builtins.readFile (pkgs.fetchurl {
url = "https://github.com/StevenBlack/hosts/raw/${hostsVersion}/alternates/fakenews-gambling-porn/hosts";