Skip to content

Instantly share code, notes, and snippets.

@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";
@jethrokuan
jethrokuan / email.nix
Created Sep 23, 2018
NixOS email setup
View email.nix
{pkgs, ...}:
{
environment.systemPackages = with pkgs; [
pass
isyncUnstable
msmtp
notmuch
pinentry_qt5
];
View weekly_review.org

Get Clear [0/3]

  • [ ] Collect Loose Papers and Materials: Pull out all miscellaneous pieces of paper, business cards, receipts, and so on that have crept into the crevices of your desk, clothing, and accessories. Put it all in your in-tray for processing.
  • [ ] Get “IN” to Zero: Review any meeting notes and miscellaneous scribbles on notepaper or in your mobile devices. Decide and list any action items, projects, waiting-fors, calendar events, and someday/maybes, as appropriate. File any reference notes and materials. Get the “in” areas of e-mails, texts, and voice mails to
@jethrokuan
jethrokuan / squat.js
Last active Jul 23, 2018
Archipelago Squatter
View squat.js
// Bookmarklet Usage:
javascript:(function () {
var audio = new Audio('https://notificationsounds.com/notification-sounds/definite-555/download/ogg');
var targetNode = document.getElementsByClassName("ng-toast__list")[0];
var config = {
childList: true,
subtree: true
};
View dg4.md

Discussion Group Exercises Week 4

Problems

Problem 1

What is the recursive definition of Pascal's triangle? What are the base cases?

  1. row == 1
  2. column == 1 (first element of each row)
  3. column == row(last element of each row)
You can’t perform that action at this time.