Skip to content

Instantly share code, notes, and snippets.

View joshukraine's full-sized avatar
🏠
Working from home

Joshua Steele joshukraine

🏠
Working from home
View GitHub Profile
@joshukraine
joshukraine / dev.log
Created December 15, 2013 17:50
in Chrome...
# In Chrome, start on home page, enter invalid input. Flash is displayed
Started GET "/students/search?utf8=%E2%9C%93&search=asdf&submit=%EF%80%82" for 127.0.0.1 at 2013-12-15 18:31:12 +0200
Processing by StudentsController#search as HTML
Parameters: {"utf8"=>"✓", "search"=>"asdf", "submit"=>"?"}
Coach Load (0.4ms) SELECT "coaches".* FROM "coaches" WHERE "coaches"."remember_token" = 'qnT_bGpti6JLWWLtFaM7DA' ORDER BY coaches.created_at ASC LIMIT 1
@@@@ flash: #<ActionDispatch::Flash::FlashHash:0x007fa2cda87290>
@@@@ session: {"session_id"=>"0d3e2d6679ba059a32fda992098d76bb", "_csrf_token"=>"FCi64KNpqW1ty7YTNibievP8VlmVm/PnGxWtNp0ylBM=", "return_to"=>"http://localhost:3000/"}
@@@@ request.referer: http://localhost:3000/
Redirected to http://localhost:3000/
@joshukraine
joshukraine / dev.log
Created December 15, 2013 17:51
in Safari
# Now in Safari. Start on homepage, enter invalid input. Flash is displayed
Started GET "/students/search?utf8=%E2%9C%93&search=asfsdf&submit=%EF%80%82" for 127.0.0.1 at 2013-12-15 18:33:01 +0200
Processing by StudentsController#search as HTML
Parameters: {"utf8"=>"✓", "search"=>"asfsdf", "submit"=>"?"}
Coach Load (0.4ms) SELECT "coaches".* FROM "coaches" WHERE "coaches"."remember_token" = 'qnT_bGpti6JLWWLtFaM7DA' ORDER BY coaches.created_at ASC LIMIT 1
@@@@ flash: #<ActionDispatch::Flash::FlashHash:0x007fa2d053d5e8>
@@@@ session: {"session_id"=>"996952e20fbf975af7a4396f8a3aa7da", "_csrf_token"=>"EwfOi3Ny0GDZXOIeHwG7NHcwbwr3WR2c6qPk6zSHRNU=", "return_to"=>"http://localhost:3000/"}
@@@@ request.referer: http://localhost:3000/
Redirected to http://localhost:3000/
@joshukraine
joshukraine / config.json
Last active August 29, 2015 14:03
My powerline config
// ~/.config/powerline/config.json
{
"common": {
"term_truecolor": false,
"dividers": {
"left": {
"hard": " ",
"soft": "| "
},
@joshukraine
joshukraine / how-to-install-powerline-on-osx.md
Last active August 10, 2020 03:04
How to Install Powerline on OS X

How to Install Powerline on OS X

Preface

This whole thing hinges on having the right version of Python installed. We're going to do it via Homebrew. You have to install Python BEFORE you install Vim. So if Vim is already installed (the Homebrew version, that is) then remove it first.

Installation

Check to see if vim or python are installed.

brew list

@joshukraine
joshukraine / default.json
Last active August 29, 2015 14:03
My powerline vim theme
// ~/.config/powerline/themes/vim/default.json
{
"segment_data": {
"branch": {
"before": ""
},
"modified_indicator": {
"args": { "text": "+" }
},
# lib/capistrano/tasks/remote_rake_task.rake
#
# This task allows you to run rake tasks on the remote server using Capistrano.
# The rake task itself is passed in as an argument.
# Example:
# bin/cap staging "task:invoke[app:setup]"
#
# References:
# http://www.jetthoughts.com/blog/magic/2013/09/26/capistrano-3-passing-parameters-to-your-task.html
# http://stackoverflow.com/questions/23828950/how-to-run-custom-rake-task-via-capistrano-3

This is a test!

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

rails: bin/rails server
postgres: postgres -D /usr/local/var/postgres
redis: redis-server /usr/local/etc/redis.conf
livereload: bin/guard -P livereload

That time I had to compile Vim from source...

January 2, 2018

Recently, something broke in Homebrew's version of Vim. Several things seemed weird, but what first caught my eye was that misspelled words were no longer highlighted in Markdown files. This is a feature that I have previously configured and I use it often when writing blog posts and such.

Initially, I assumed I had a problem with my Vim settings. After much troubleshooting and no joy, I finally uninstalled Homebrew's version of Vim which caused my system to fall back to the default version of Vim that ships with macOS. Suddenly the highlighting worked fine.

After doing some further research, I decided I would try to compile and install Vim myself. After some googling and patching together a few different articles, this is what worked for me.

@joshukraine
joshukraine / syntime_re0.txt
Created January 27, 2018 07:44
Vim syntime report in a ruby file with regexpengine=0
TOTAL COUNT MATCH SLOWEST AVERAGE NAME PATTERN
0.494780 7555 0 0.000914 0.000065 rubyString \%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]`\z([^`]*\)`.*\)\@<=\n
0.489842 7555 0 0.000980 0.000065 rubyString \%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\>.*$\)\@<=\n
0.481765 7555 0 0.000933 0.000064 rubyString \%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\).*$\)\@<=\n
0.478531 7555 0 0.000908 0.000063 rubyString \%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<[-~]'\z([^']*\)'.*\)\@<=\n
0.476628 7555 0 0.000893 0.000063 rubyString \%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<"\z([^"]*\)".*\)\@<=\n
0.475943 7555 0 0.000882 0.000063 rubyString \%(^.*\%(\%(class\|::\)\s*\|\%([]}).]\)\s\|\w\)\@<!<<`\z([^`]*\)`