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
#!/bin/sh | |
echo You should have the project tracked by version control in case something goes wrong. | |
printf 'Press any key to continue...' | |
read -r | |
path=${1:-.} | |
echo Optimizing images in "$path" | |
if [ -z "$(command -v jpeg-recompress)" ] || [ -z "$(command -v ladon)" ] || [ -z "$(command -v mogrify)" ]; then |
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
" plugins | |
call plug#begin() | |
Plug 'jremmen/vim-ripgrep' | |
Plug 'epilande/vim-es2015-snippets' | |
Plug 'epilande/vim-react-snippets' | |
Plug 'SirVer/ultisnips' | |
Plug 'neomake/neomake' | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'junegunn/fzf.vim' | |
Plug 'pangloss/vim-javascript' |
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 HtmlPage | |
def self.matches?(request) | |
request.env['CONTENT_TYPE'] == 'text/plain' | |
end | |
end | |
Rails.application.routes.draw do | |
get '/me', to: 'home#me', defaults: { format: 'json' }, as: :profile | |
constraints HtmlPage 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
def cats_in_hats n | |
cats = Array.new(n) | |
(0...n).each do |i| | |
(1..n).each do |j| | |
cats[i] = !cats[i] if i % j == 0 | |
end | |
end | |
cats |
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
<!DOCTYPE html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Heinz</title> | |
<link href="//cdn.getchute.com.s3.amazonaws.com/apps/rights-lp/heinz/style.css" rel="stylesheet"> | |
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"> | |
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script> | |
<script src="//static.getchute.com/exposure/rails.js"></script> | |
<script src="{{AppConfig['chute']['auth_script']}}"></script> |