Skip to content

Instantly share code, notes, and snippets.

@analyticd
analyticd / colorize-emacs.bashsource
Created Apr 17, 2021 — forked from algal/colorize-emacs.bashsource
Setting up truecolor (24 bit color) in emacs in the terminal, under iTerm2, blink.sh, and others.
View colorize-emacs.bashsource
# sourcing this file will define a bash functions that
# tries to run subsequent calls to emacs with 24 bit color.
#
# It sets TERM=xterm-emacs-leg if
# - we've created a user-local terminfo record for xterm-emacs-leg, and
# - we're using iTerm2 or something has set COLORTERM=truecolor
#
# This will cause emacs to use 24 bit color only when it will work,
# inside or outside of tmux. I haven't found a way to auto-detect Blink.sh yet.
#
@analyticd
analyticd / myweechat.md
Created Mar 26, 2020 — forked from pascalpoitras/myweechat.md
My always up-to-date WeeChat configuration (weechat-dev)
View myweechat.md

WeeChat Screenshot

You need at least WeeChat 2.8-dev

Enable mouse

/mouse enable
View default.nix
penelope = with pkgs; python3Packages.buildPythonPackage rec {
pname = "penelope";
version = "3.1.3.0";
src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "0vicjkxhi8ncwgfnicc02xvww7idam0jikry878rsdgi9x30vkbl";
};
buildInputs = [ python3Packages.lxml python3Packages.marisa-trie ];
View zshrc.sh
###############
## oh-my-zsh ##
###############
# To install:
# curl -Lo install.sh https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
# sh install.sh
# or
# sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# ohmyzsh will create a ~/.zshrc that blows away my symbolic link to
# ~/elisp/zsh/zshrc. I have to remove that and then recreate the symbolic link:
View zshrc.sh
noaliases off
allexport off
noalwayslastprompt off
alwaystoend on
appendcreate off
noappendhistory off
autocd on
autocontinue off
noautolist off
noautomenu off
@analyticd
analyticd / 1-setopts.zsh
Created Jan 9, 2020 — forked from mattmc3/1-setopts.zsh
ZSH - options by framework
View 1-setopts.zsh
## ZSH Options
# http://zsh.sourceforge.net/Doc/Release/Options.html
# Changing Directories
# http://zsh.sourceforge.net/Doc/Release/Options.html#Changing-Directories
setopt auto_cd # if a command isn't valid, but is a directory, cd to that dir
setopt auto_pushd # make cd push the old directory onto the directory stack
setopt pushd_ignore_dups # don’t push multiple copies of the same directory onto the directory stack
setopt pushd_minus # exchanges the meanings of ‘+’ and ‘-’ when specifying a directory in the stack
@analyticd
analyticd / .profile.sh
Created Dec 31, 2019 — forked from howardabrams/.profile.sh
Bulk of my server-side profile that when I first log into the system, it starts up Emacs as a daemon and a `tmux` session. From then on, I just attach to that `tmux,` and use `emacsclient` to edit files... especially with a `split-window`.
View .profile.sh
alias e='emacsclient -q -a emacs'
EDITOR=emacsclient
function e {
tmux new-window -a -n "emacs" "$EDITOR $@"
}
function ee {
tmux split-window "$EDITOR $@"
@analyticd
analyticd / softhruf-splitography.org
Last active Nov 30, 2019
How to change the keymap on the SOFT/HRUF Splitography keyboard
View softhruf-splitography.org

How to change the keymap on the Splitography keyboard

We, follow this guide Getting Started - QMK Firmware carefully. I am on macOS High Sierra, so these notes pertain only to that.

When you get to the part of the above guide where it is time to clone the qmk repo, I do the following:

I don’t want all the history of objects and logs in the repo or its submodules, so I clone shallow both the repo and its submodules:

@analyticd
analyticd / factor_analysis.py
Created Feb 26, 2018 — forked from schalekamp/factor_analysis.py
simple factor analysis using python/pandas
View factor_analysis.py
# basic factor analysis
# http://blog.alphaarchitect.com/2015/05/28/basic-factor-analysis-simple-tools-to-understand-what-drives-performance/
import pandas as pd
import pandas.io.data as web
import datetime, re, copy
import numpy as np
import statsmodels.formula.api as sm
start = datetime.date(2000,1,1)
View big-array.lisp
(defconstant array-max-size (1- array-total-size-limit))
(defstruct bigvector
total-size
slice-size
last-slice-size
slices)
(declaim (inline allocate-vector))
(defun allocate-vector (size element-type)
(declare (type integer size))