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
class ApplicationController < ActionController::API | |
before_action :authenticate_user_from_token! | |
def authenticate_user_from_token! | |
auth_token = request.headers['Authorization'] | |
auth_token ? authenticate_with_token!(auth_token) : authentication_error | |
end | |
def authenticate_with_token!(token) | |
unless token.include?(':') |
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
brew install vim --with-features=huge --enable-interp=lua,ruby,perl,python |
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
rvm also has this problem. If zsh is your default shell when it starts /etc/zshenv gets executed. | |
This executes /usr/libexec/path_helper. That sets up the path based on the contents /etc/paths and /etc/paths.d/. | |
The faq for rvm mentions moving /etc/zshenv to /zsh/zshrc. I did this and it removed the /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin from the start of my path in macvim. |
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
syntax on | |
set ruler " Show the line and column numbers of the cursor. | |
set formatoptions+=o " Continue comment marker in new lines. | |
set textwidth=0 " Hard-wrap long lines as you type them. | |
set modeline " Enable modeline. | |
set esckeys " Cursor keys in insert mode. | |
set linespace=0 " Set line-spacing to minimum. | |
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J) | |
" More natural splits | |
set splitbelow " Horizontal split below current. |
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
{ | |
"exercises": [ | |
{ | |
"id": 13, | |
"name": "10 Month Position Dumbbell Press", | |
"video_url": "https://www.youtube.com/watch?v=z03wi63jUy0", | |
"created_at": "2020-04-05T19:54:32.423-05:00", | |
"updated_at": "2020-04-05T19:54:32.423-05:00", | |
"url": "https://www.thefitprocess.com/exercises/13.json", | |
"key": 13, |
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
############################################################################### | |
# Helpful Docker commands and code snippets | |
############################################################################### | |
### CONTAINERS ### | |
docker stop $(docker ps -a -q) #stop ALL containers | |
docker rm -f $(docker ps -a -q) # remove ALL containers | |
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter | |
# exec into container |