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
| # cd into your dotfiles repo and run this to add all of your | |
| # installed pathogen plugins as submodules of your dotfiles repo: | |
| ls ~/.vim/bundle \ | |
| | xargs -I% echo "grep -m1 -oP 'https[^\ ]+' <(cd ~/.vim/bundle/% && git remote -v show)" \ | |
| | bash \ | |
| | xargs -n1 git submodule add |
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
| # Dependency: http://stedolan.github.io/jq/ | |
| jq '{total_districts: .[].count, students: [ .[][].data.students | length ]} | .total_students = reduce .students[] as $i (0; . + $i) | .total_students / .total_districts' <(curl -s -u DEMO_KEY: https://api.getclever.com/v1.1/sections) 2>/dev/null |
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 luajit | |
| local string = string | |
| local socket = require 'socket' | |
| --- Returns the character at index i (just some syntactic sugar for str:gsub(i,i)) | |
| -- @usage ('foobar'):c(3) == 'o' -- True | |
| -- @string i Index of character within string | |
| -- @returns Character at index i within string | |
| function string:c(i) |
NewerOlder