Skip to content

Instantly share code, notes, and snippets.

View witt3rd's full-sized avatar
⌨️
coding

Donald Thompson witt3rd

⌨️
coding
View GitHub Profile
@witt3rd
witt3rd / rename_a_mac.md
Created September 13, 2020 12:36
really rename a mac
export MY_NAME="MyName"
sudo scutil --set ComputerName "$MY_NAME" && \
sudo scutil --set HostName "$MY_NAME" && \
sudo scutil --set LocalHostName "$MY_NAME" && \
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "$MY_NAME"
@witt3rd
witt3rd / Idris.md
Last active September 13, 2020 16:02
Idris and Idris2 setup

Idris

Install

macOS

brew install idris
@witt3rd
witt3rd / Neovim.md
Last active September 13, 2020 16:02
Neovim setup

Neovim

brew install neovim
mkdir ~/.config/nvim
touch ~/.config/nvim/init.vim
cd ~/.config/nvim
curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

You should now have plug.vim in your autoload directory so it will load of on start.

@witt3rd
witt3rd / haskell.md
Last active September 13, 2020 16:39
Haskell setup
@witt3rd
witt3rd / live-coding-setup.md
Last active September 13, 2020 16:04
Live coding setup

Live Coding Setup

Here is a list of tools and gear I use to make YouTube videos for coding. I will try to keep it up-to-date as I evolve and get better at producing content. Leave a comment, if you have suggestions!

Windows 10

I use both Mac and Windows, but I am currently doing all the capture and production on Windows. For coding, I find the Linux shell much better than PowerShell or the Windows Command Prompt.

Development Environment

@witt3rd
witt3rd / youtube-dl.md
Last active October 25, 2020 14:09
YouTube Download Recipes

youtube-dl Recipes

brew install youtube-dl ffmpeg

Download video or playlist

youtube-dl -f best 'http://www.youtube.com/watch?v=P9pzm5b6FFY'
@witt3rd
witt3rd / useful-q-lambdas.md
Last active September 13, 2020 16:05
Useful Q Lambdas

GraphQL requests to CKG services

// wrap in async function
return (async () => {
  // request graphql
  const data = await input.__requestCkg({
    svcRef: "/service/donald-hello-world",
    query: "query { allFoos { id } }"
  })
  

Maana Q + Semantic Web/Linked Data

At the center of the Maana Q Knowledge Platform is the Computational Knowledge Graph, which consists of a cloud distributed set of GraphQL and RESTful microservices. Each service exposes a set of types and functions. The functions can be evaluated lazily (i.e., streaming) or strict/eager (i.e., batch) and can be marked as having pure (i.e., referential integrity) vs effectful (i.e., causes change or relies on changing externals) semantics.

The purpose of this system is to represent domain knowledge (i.e., concepts, properties, relations, individuals) and perform reasoning (i.e., operations performed on the domain to achieve various goals). This is similar in nature to the goals of the Semantic Web, which aims to unify:

  • Linking data
  • Organizing data into "ontologies"
  • Querying data
  • Logical inference (e.g., deduction, induction)

While the goals are similar, the underlying

@witt3rd
witt3rd / utils.js
Last active June 13, 2019 15:23
Useful code snippets in JavaScript
const fs = require("fs-extra");
const Path = require("path");
//
// String utilities
//
// Ensure initial letter is capitalized
const capitalize = word => word[0].toUpperCase() + word.substr(1);

Meta

Meta is a NodeJS-based shell command that provides a solution to working with many repos across machines/teams without the tradeoffs involved with submodules or monorepos.

Install

npm i -g meta

Create a new meta repo

mkdir my-meta-repo
cd my-meta-repo