Skip to content

Instantly share code, notes, and snippets.

@Lytol
Lytol / pi.js
Last active March 17, 2021 23:53 — forked from ggrumbley/pi.js
// Define a method that rounds pi to a specified decimal place
// Return Pi and how many iterations of the following formula that it took to accomplish
// pi = 4 * (1 – 1/3 + 1/5 – 1/7 + ...)
function* pi() {
let n = 1;
let series = 0;
while(true) {
next = 1/(n*2-1)

Pok3r Custom Mapping

DIP switch config for QWERTY with Caps Lock FN

1: off
2: off
3: on

4: off

autoload -Uz vcs_info
zstyle ':vcs_info:*' stagedstr '%F{green}●%f'
zstyle ':vcs_info:*' unstagedstr '%F{red}●%f'
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' formats '[%F{027}%b%f%c%u] '
zstyle ':vcs_info:*' enable git
theme_precmd () {
if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]] {
zstyle ':vcs_info:*' formats '[%F{027}%b%f%c%u] '
# terminal with 256 color
set -g default-terminal "screen-256color"
# Clipboard fix for iterm + OS X
set-option -g default-command "reattach-to-user-namespace -l zsh"
# command prefix (like screen)
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
Rake::Task['test'].clear
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.test_files = FileList['test/**/*_test.rb']
end
@Lytol
Lytol / layer1.kll
Created April 21, 2015 06:23
Lytol's Keyboard Layout for Infinity Keyboard
Name = Layer1;
Version = 0.1.0;
Author = "Brian Smith <brian.e.smith@gmail.com";
KLL = 0.3;
# Modified Date
Date = 2015-03-05;
# Number row
SHELL = /bin/bash
all: build
prepare:
cp *.kll controller/kll/layouts/
cd build; cmake ../controller; cd ..
build: prepare
cd build; make; cd ..
# Replace the Gemfile wholesale, it's just easier
#
remove_file "Gemfile"
create_file "Gemfile", <<-EOF
source 'https://rubygems.org'
ruby '2.1.5'
gem 'rails', '4.2.0'
gem 'pg'
@Lytol
Lytol / dev
Created December 3, 2014 01:52
#!/bin/bash
SESSION=`basename $PWD`
tmux new-session -d -s $SESSION -n 'Shell'
tmux split-window -h
if [[ -e Procfile ]]; then
tmux new-window -t $SESSION:1 -n 'Foreman'

Keybase proof

I hereby claim:

  • I am lytol on github.
  • I am lytol (https://keybase.io/lytol) on keybase.
  • I have a public key whose fingerprint is 3DB8 E053 0DA6 9360 051D 0293 DF0D 5FC9 FD91 1F24

To claim this, I am signing this object: