This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grading_period = @context.courses.detect do |course| | |
gp = GradingPeriod.context_find(course, params[:grading_period_id]) and break gp | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# SSH to the user and host given by a Git remote and chdir to the repo path. | |
# The first argument is the remote name. All other arguments are passed to | |
# SSH, with some fudging to run a login shell if no command is given. | |
# Use git ssh -d to see the exact SSH command. | |
# Copyright (c) Tim Pope. Distributed under the MIT License. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nmap <script> <SID>: :<C-R>=getcmdline() =~ ',' ? "\0250" : ""<CR> | |
nmap <script> d<CR> <SID>:Dispatch<CR> | |
nmap <script> d<Space> <SID>:Dispatch<Space> | |
nmap <script> d! <SID>:Dispatch! | |
nmap <script> <SID>make <SID>:<C-R>=exists(':Make') > 1 ? 'Make' : 'make'<CR> | |
nmap <script> m<CR> <SID>make<CR> | |
nmap <script> m<Space> <SID>make<Space> | |
nmap <script> m! <SID>make! | |
" Is there a better mnemonic than =? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:butt() abort | |
syn match cloud2butt "\<th\%(e cloud\>\)\@=" conceal cchar=m | |
syn match cloud2butt "\%(\<th\)\@<=e\%( cloud\>\)\@=" conceal cchar=y | |
syn match cloud2butt "\%(\<the \)\@<=c\%(loud\>\)\@=" conceal cchar=b | |
syn match cloud2butt "\%(\<the c\)\@<=l\%(oud\>\)\@=" conceal cchar=u | |
syn match cloud2butt "\%(\<the cl\)\@<=o\%(ud\>\)\@=" conceal cchar=t | |
syn match cloud2butt "\%(\<the clo\)\@<=ud\>" conceal cchar=t | |
endfunction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def ^:private autocmds (dict)) | |
(defmacro augroup [name & body] | |
`(try | |
(execute "augroup" ~(str name)) | |
(execute "autocmd!") | |
~@body | |
(finally (execute "augroup END")))) | |
(defmacro autocmd [type pattern & body] | |
(let [sym (gensym "autocmd")] | |
`(do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'gmail' | |
require 'github_api' | |
require 'netrc' | |
require 'pry' | |
netrc = Netrc.read | |
github = Github.new(basic_auth: netrc['api.github.com'].join(':')) | |
Gmail.new(*netrc['imap.gmail.com']) do |gmail| | |
gmail.inbox.emails(from: 'github.com').each do |message| | |
begin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[extensions] | |
color = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Install in PATH as foremux | |
if %w(help --help -h).include?(ARGV.first) | |
$stderr.puts <<-help | |
Usage: | |
foremux [PROCESS] | |
Options: | |
-e, [--env=ENV] # Specify an env file to load, defaults to .env |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
machine api.heroku.com | |
login [email protected] | |
password 01230123012301230123012301230123 | |
machine api.github.com password something login somebody | |
machine ftp.server login abc password def account ghi macdef somemacro | |
cd somehwhere | |
continues until end of paragraph |