Skip to content

Instantly share code, notes, and snippets.

View jasonm23's full-sized avatar

Jason Milkins jasonm23

View GitHub Profile
@jasonm23
jasonm23 / text-property-api.org
Last active August 31, 2022 10:08 — forked from Fuco1/text-property-api-org
Text property api for emacs

All these operations are very natural for buffer objects as well as strings, which leads me to the conclusion we should provide two flavours for each function, for buffers and for strings. The way emacs does it is by specifying an object argument. I find this suboptimal, but it is also possible solution (and would reduce the number of functions in half). Note that there are also different indexing conventions, see the Question below.

All functions come in buffer and string flavours. The “current position” is called point in buffer versions and offset in string

@jasonm23
jasonm23 / Alphabet Sentences.txt
Created October 20, 2018 05:28
Alphabet Sentences
Alphabet Sentences
@jasonm23
jasonm23 / sample .json
Last active May 22, 2018 23:58 — forked from jonfuller/status.json
Transmission RPC
{"arguments":{"torrents":[{"id":5,"name":"60.Minutes.S50E37.1080p.WEB.x264-CookieMonster[rarbg]","percentDone":0.4061},{"id":6,"name":"Elementary.S06E04.1080p.HDTV.X264-DIMENSION[rarbg]","percentDone":0.1815},{"id":7,"name":"Stephen.Colbert.2018.05.21.Zachary.Quinto.1080p.WEB.x264-TBS[rarbg]","percentDone":0.1827}]},"result":"success"}
@jasonm23
jasonm23 / README.md
Last active September 10, 2020 20:00 — forked from hamann/gist:39371c46806e14ab3853
Elixir mix oh-my-zsh completion plugin

Elixir Mix Oh-My-Zsh plugin

Copy the folder ./elixir_mix/ to ~/.oh-my-zsh/custom/plugins/ and add _elixir_mix to your .zshrc plugins list. e.g.

Example:

plugins=(
  autojump
 git
#!/bin/bash
#
# Bash script to setup headless Selenium (uses Xvfb and Chrome)
# (Tested on Ubuntu 12.04) trying on ubuntu server 14.04
# Add Google Chrome's repo to sources.list
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list
# Install Google's public key used for signing packages (e.g. Chrome)
# (Source: http://www.google.com/linuxrepositories/)
@jasonm23
jasonm23 / .ctags
Last active August 29, 2015 14:18 — forked from rosenfeld/.ctags
--langdef=coffee
--langmap=coffee:.coffee
--regex-coffee=/(^|=[ \t])*class ([A-Za-z_][A-Za-z0-9_]+\.)*([A-Za-z_][A-Za-z0-9_]+)( extends ([A-Za-z][A-Za-z0-9_.]*)+)?$/\3/c,class/
--regex-coffee=/^[ \t]*(module\.)?(exports\.)?@?(([A-Za-z][A-Za-z0-9_.]*)+):.*[-=]>.*$/\3/m,method/
--regex-coffee=/^[ \t]*(module\.)?(exports\.)?(([A-Za-z][A-Za-z0-9_.]*)+)[ \t]*=.*[-=]>.*$/\3/f,function/
--regex-coffee=/^[ \t]*(([A-Za-z][A-Za-z0-9_.]*)+)[ \t]*=[^->\n]*$/\1/v,variable/
--regex-coffee=/^[ \t]*@(([A-Za-z][A-Za-z0-9_.]*)+)[ \t]*=[^->\n]*$/\1/f,field/
--regex-coffee=/^[ \t]*@(([A-Za-z][A-Za-z0-9_.]*)+):[^->\n]*$/\1/f,static field/
--regex-coffee=/^[ \t]*(([A-Za-z][A-Za-z0-9_.]*)+):[^->\n]*$/\1/f,field/
--regex-coffee=/((constructor|initialize):[ \t]*\()@(([A-Za-z][A-Za-z0-9_.]*)+)([ \t]*=[ \t]*[^,)]+)?/\3/f,field/
@jasonm23
jasonm23 / .ctags
Last active August 29, 2015 14:18 — forked from rosenfeld/.ctags
--langdef=CoffeeScript
--langmap=CoffeeScript:.coffee
--regex-CoffeeScript=/(^|=[ \t])*class ([A-Za-z.]+)( extends [A-Za-z.]+)?$/\2/c,class/
--regex-CoffeeScript=/^[ \t]*@?([A-Za-z.]+):.*[-=]>.*$/\1/f,function/
--regex-CoffeeScript=/^[ \t]*([A-Za-z.]+)[ \t]+=.*[-=]>.*$/\1/f,function/
--regex-CoffeeScript=/^[ \t]*([A-Za-z.]+)[ \t]+=[^-=>\n]*$/\1/v,variable/

My modified fork of agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

Compatibility

@jasonm23
jasonm23 / git-ignore
Last active August 29, 2015 14:02 — forked from anonymous/git-ignore
Use to quickly add patterns to .gitignore
#!/bin/sh
# Install:
#
# copy to /usr/local/bin
#
# Usage:
#
# git ignore [[pattern] [pattern] [...]]
#
class NestedAttributesForStrategy
def association(runner)
runner.run
end
def result(evaluation)
evaluation.object.tap do |instance|
evaluation.notify(:after_build, instance)
return attributes(instance)
end