This file contains 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
DATABASE='NAME' | |
echo 'SHOW TABLES;' \ | |
| mysql -u root ${DATABASE} \ | |
| awk '!/^Tables_in_/ {print "ALTER TABLE `"$0"` ENGINE = InnoDB;"}' \ | |
| column -t \ | |
| mysql -u root ${DATABASE} |
This file contains 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
@mixin scale-sprite($map, $sprite, $scale : 1) { | |
$sprite-file: sprite-file($map, $sprite); | |
$width-to-map-ratio: sprite-map-width($map)/image-width($sprite-file); | |
$pos: sprite-position($map, $sprite, 0, 0); | |
$height: image-height($sprite-file) * $scale; | |
$width: image-width($sprite-file) * $scale; | |
$x: nth($pos, 1) * $scale; | |
$y: nth($pos, 2) * $scale; |
This file contains 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/zsh | |
function git-what-did-i-do-x-days-ago() { | |
git log --since="6 am $1 days" --after="12 am $1 days" #formatting tags etc | |
} |
This file contains 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
bare: yes | |
break-before-br: yes | |
clean: yes | |
fix-uri: yes | |
#indent-attributes: yes | |
indent-spaces: 2 | |
indent: yes | |
logical-emphasis: yes | |
markup: yes | |
output-xhtml: yes |
This file contains 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
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.log,*.sqlite3,public/assets/* |
This file contains 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! SwapLightAndDarkColorscheme() | |
if g:colors_name == 'solarized' | |
colorscheme molokai | |
elseif g:colors_name == 'molokai' | |
colorscheme solarized | |
endif | |
endfunction | |
command! SwapColors :call SwapLightAndDarkColorscheme() |
This file contains 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
nnoremap <leader>g :set operatorfunc=AgOperator<cr>g@ | |
vnoremap <leader>g :<c-u>call AgOperator(visualmode())<cr> | |
function! AgOperator(type) | |
if a:type ==# 'v' | |
normal! `<v`>y | |
elseif a:type ==# 'char' | |
normal! `[v`]y | |
else | |
return |
This file contains 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 'spec_helper' | |
describe DietSearcher, type: :model do | |
let(:params) do | |
{ 'per_page' => '', | |
'product_search_form' => { 'allergens_ids' => ['1'] } } | |
end | |
describe 'Spree searcher intergration', type: :controller do | |
let(:vegan_cookies) { create :wellness_product } |
This file contains 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
let g:projectiles= { | |
\ 'Gemfile' : { | |
\ 'app|lib' : { | |
\ 'dispatch': "bundle exec rspec #", | |
\ }, | |
\ '*_spec.rb' : { | |
\ 'dispatch': "bundle exec rspec {file}", | |
\ 'make' : "bundle exec rspec", | |
\ 'start' : "bundle exec rescue rspec {file}" | |
\ } |
This file contains 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
nnoremap <space><insert> :execute('Start bundle exec rescue rspec %:' . line('.'))<CR> |
OlderNewer