Skip to content

Instantly share code, notes, and snippets.

@karlbright
karlbright / flake.nix
Last active July 1, 2024 01:29
...awk4d5-clang-wrapper-16.0.6/bin/ld: line 269: 62128 Killed: 9
{
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.0.tar.gz";
outputs = { self, nixpkgs }:
let
overlays = [ (final: prev: { go = prev.go_1_22; }) ];
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit overlays system; };
});
function fish_greeting
echo -e "\e[1;33m⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"
echo -e "\e[1;33m⢀⡟⢷⣄⠀⠀⠀⠀⣤⠞⠉⠤⣄⠙⢳⣤⣄⣠⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"
echo -e "\e[1;33m⢸⡇⠀⠙⣦⡀⠀⢸⡇⠀⠀⠀⡴⠋⠁⠀⠀⠀⠀⠉⠛⢦⡶⠚⠚⠳⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"
echo -e "\e[1;33m⠀⢻⡀⠀⠘⢷⡀⠸⣧⠖⠢⡎⣤⠄⠀⠀⠀⠀⠀⠀⠀⠀⠹⡖⠒⠄⠘⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀"
echo -e "\e[1;33m⢠⣤⣷⡄⠀⠈⢻⣄⡇⠀⢠⡇⠀⠀⠀⢰⠤⢭⣠⠀⠀⠀⣀⣱⠀⢂⠀⣿⠀⠀⠀⠀⢀⣀⠀⠀⠀ \e[1;33mLeave it to Kero-chan!"
echo -e "\e[1;33m⢸⡇⠉⠻⣆⠀⠀⠙⠇⠀⠀⢳⡀⠀⠀⢸⠉⠓⡏⠀⠀⠀⠀⢹⠀⠀⢠⡿⢀⣠⠶⠞⠋⢹⡇⠀⠀ \e[1;90mケロちゃんにおまかせ!"
echo -e "\e[1;33m⠀⢻⣄⠀⠈⠳⣄⠀⡇⠀⠀⠈⡇⠀⠀⢠⠀⣸⠁⠀⠀⠀⠀⣘⣠⣴⡿⠟⠋⠀⠀⠀⣠⡞⠁⠀⠀ "
echo -e "\e[1;33m⠀⢀⡿⣷⣄⠀⠀⠑⢇⠀⠀⠀⢸⠀⠀⠈⠈⠁⠀⠀⠀⢀⣼⠿⠛⠁⠀⠀⣀⣤⣴⠿⣯⠀⠀⠀⠀ \e[1;97mKonyonyochiwa!!!"
echo -e "\e[1;33m⠀⠈⢷⡀⠈⠙⠢⠄⢸⡀⠀⠀⠀⠑⠢⢤⣀⣀⣠⠤⢾⠋⠀⠠⠤⠐⠚⠉⠁⠀⠀⣠⡾⠀⠀⠀⠀"
use aes_gcm::aead::{generic_array::GenericArray, Aead, NewAead, Payload};
use aes_gcm::Aes256Gcm;
use sodiumoxide::{
base64,
crypto::{box_::PublicKey, sealedbox},
randombytes,
};
use std::error::Error;
use std::time::{SystemTime, UNIX_EPOCH};
@karlbright
karlbright / wad.el
Last active January 29, 2021 03:02
;;; wad.el --- Bring your own modules -*- lexical-binding: t; -*-
;; Copyright (C) 2020-2021 Karl Brightman
;; Author: Karl Brightman <karl@karlbright.org>
;; Maintainer: Karl Brightman <karl@karlbright.org>
;; Created: 13 December 2020
;; Version: 0.0.1
;; URL: https://github.com/karlbright/wad.el
;;; modules/core/straight/init.el -*- lexical-binding: t; -*-
(let ((recipe (wad/package-get 'straight :recipe)))
(setq straight-base-dir wad/local-dir
straight-repository-branch (or (plist-get recipe :branch) "develop")
straight-build-dir (format "build-%s" emacs-version)
straight-cache-autoloads nil
straight-check-for-modifications nil
straight-enable-package-integration nil
straight-vc-git-default-clone-depth 1
@karlbright
karlbright / wad.el
Last active January 1, 2021 10:44
wad
;;; wad.el --- Opinionated emacs configuration inspired by Doom Emacs. -*- lexical-binding: t; -*-
(require 'cl-lib)
(defvar wad/modules (make-hash-table :test 'equal)
"A table of enabled modules. Set by `wad/modules!' where the key
is a cons of (category . module) and the value is a plist of metadata
related to the module.")
(defvar wad/current-module nil)
@karlbright
karlbright / wget.md
Last active September 26, 2020 06:06
wget  --random-wait --timestamping http://www.ghibli.jp/gallery/{ged,chihiro,karigurashi,ponyo,kokurikozaka,marnie,kaguyahime,kazetachinu}{001..050}.jpg
aria2
automake
awscli
bash
bat
boost-python
calc
clojure
coreutils
ctags
@karlbright
karlbright / playground.rs
Created January 16, 2020 02:59 — forked from rust-play/playground.rs
Code shared from the Rust Playground
#![allow(dead_code)]
use std::fmt::Debug;
#[derive(Debug)]
struct Matchbook {
matchers: Vec<Box<dyn Matcher>>,
}
impl Matchbook {
import React, {Component, Fragment} from 'react'
import {storiesOf} from '@storybook/react'
import sample from 'lodash/sample'
const stories = storiesOf('⚛ Context', module)
// # New React Context API
// New React Context API requires both
// React >= 16.3.0 along with ReactDOM >= 16.3.0
//
// Context provides a way to pass data through the component tree