Skip to content

Instantly share code, notes, and snippets.

View avescodes's full-sized avatar

Avery Quinn avescodes

View GitHub Profile
@cszentkiralyi
cszentkiralyi / vim-sexp-cheatsheet.md
Last active November 10, 2023 10:05
vim-sexp cheatsheet

Prereqs

These are for the combined vim-sexp (https://github.com/guns/vim-sexp) and vim-sexp-mappings-for-regular-people (https://github.com/tpope/vim-sexp-mappings-for-regular-people) plugins. vim-sexp is neat on its own but Tim Pope makes common stuff much easier.

Note that some vim-sexp functionality depends on <LocalLeader> mappings. This is a different leader key than the global leader, and is the variable maplocalleader (instead of mapleader). To see if you have this set, use :echo maplocalleader; if it errors out you'll need to set it, otherwise it will echo the key. If you want to set your LocalLeader to <Space>, you'll need two commands in your .vimrc, since by default <Space> is bound to <Right> in normal mode:

nnoremap <Space> <Nop>
let maplocalleader=" "

TOC

@dylanmcdiarmid
dylanmcdiarmid / sexp-cheat-sheet
Created February 9, 2015 16:18
vim sexp mappings for normal people cheat sheet
.vimrc
" Map leader to comma
let maplocalleader=","
" Toggle this for vim-sexp to not go into insert mode after wrapping something
let g:sexp_insert_after_wrap = 0
" Toggle this to disable automatically creating closing brackets and quotes
let g:sexp_enable_insert_mode_mappings = 1
Vocab
(ns react-cljs.core
(:require-macros [reactjs.macros :refer [pure]])
(:require React [reactjs.core :as r]))
(enable-console-print!)
(declare render-ui)
(defn render-counter [id state cb]
(pure state
(ns react-cljs.core
(:require React))
(declare render)
(defn handle-change [e]
(render {:text (.. e -target -value)}))
(defn render [{:keys [text]}]
(React/renderComponent
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
(ns echo-server
(:import (java.net InetAddress DatagramPacket DatagramSocket)))
(def udp-server (ref nil))
(def port 12345)
(defn localhost [] (. InetAddress getLocalHost))
(defn message [text]
@funny-falcon
funny-falcon / changes.md
Last active March 23, 2024 05:53
Performace patch for ruby-1.9.3-p327

Changes:

  • this version includes backport of Greg Price's patch for speedup startup http://bugs.ruby-lang.org/issues/7158 .

    ruby-core prefers his way to do thing, so that I abandon cached-lp and sorted-lf patches of mine.

  • this version integrates 'array as queue' patch, which improves performance when push/shift pattern is heavily used on Array.

    This patch is accepted into trunk for Ruby 2.0 and last possible bug is found by Yui Naruse. It is used in production* for a couple of months without issues even with this bug.

Ruby 1.9.3-p194 with DTrace probes, Perf Patches, and backported COW-friendly GC

Overview

This script installs a patched version of ruby 1.9.3-p194 with DTrace probes, boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Many thanks to funny-falcon for the performance patches and to Aaron Patterson for the DTrace instrumentation.

@jasonrudolph
jasonrudolph / 00-about.md
Created September 21, 2012 18:42
Rough Notes from Strange Loop 2012

Things that suck about Sublime Text 2

This is a list I'm keeping of all the tiny little things that bother me about ST2 as I try to switch from vim.

These are nearly entirely shortcomings of Vintage.

The ones in bold are huge pains in the ass.

  1. Can't use counts with text objects: 3dap does the same thing as dap.