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
<% @uploads.each do |upload| %> | |
<%= link_to image_tag(upload.img.url(:thumb), rel: "prettyPhoto"), image_path(upload.img.url(:original)) %> | |
<% end %> | |
output: | |
<a href="/system/uploads/imgs/000/000/016/original/pics06.jpg?1402887326"><img alt="Pics06" rel="prettyPhoto" src="/system/uploads/imgs/000/000/016/thumb/pics06.jpg?1402887326" /></a> | |
How to put "rel" in to anchor? instead image tag. |
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
# lib/tasks/deploy.rake | |
namespace :deploy do | |
desc 'Deploy to staging environment' | |
task :staging do | |
exec 'mina deploy -f config/deploy/staging.rb' | |
end | |
end |
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
#!/usr/bin/env bash | |
# bash completion for azk | |
# | |
# If you using zsh needed to.... echo 'autoload -U bashcompinit && bashcompinit' >> ~/.zshrc | |
_azk(){ | |
local cur commands |
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
### Keybase proof | |
I hereby claim: | |
* I am heliohead on github. | |
* I am heliohead (https://keybase.io/heliohead) on keybase. | |
* I have a public key whose fingerprint is 3879 A5A6 9ECE 6C45 9301 4B6A EE4D 2089 E743 CC53 | |
To claim this, I am signing this object: |
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
; -*- mode: dotspacemacs -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun global-set-keys (key def &rest bindings) | |
(while key | |
(global-set-key (kbd key) def) | |
(setq key (pop bindings) | |
def (pop bindings)))) |
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
# lib/tasks/db.rake | |
namespace :db do | |
desc "Dumps the database to db/APP_NAME.dump" | |
task :dump => :environment do | |
cmd = nil | |
with_config do |app, host, db, user| | |
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump" | |
end | |
puts cmd |
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
rake db:migrate # runs (single) migrations that have not run yet. | |
rake db:create # creates the database | |
rake db:drop # deletes the database | |
rake db:schema:load # creates tables and columns within the (existing) database following schema.rb | |
rake db:setup does db:create, db:schema:load, db:seed | |
rake db:reset does db:drop, db:setup |
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
"***************************************************************************** | |
"" Vim-PLug core | |
"***************************************************************************** | |
if has('vim_starting') | |
set nocompatible " Be iMproved | |
endif | |
let vimplug_exists=expand('~/.vim/autoload/plug.vim') | |
let g:vim_bootstrap_langs = "elixir,javascript,python,ruby" |
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
# spec/support/feature_helper.rb | |
RSpec.configure do |config| | |
config.before :all do | |
ENV['PRECOMPILE_ASSETS'] ||= begin | |
case self.class.metadata[:type] | |
when :feature, :view | |
STDOUT.write "Precompiling assets..." | |
system "bundle exec rake assets:precompile > /dev/null 2>&1" |
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
uf | name | iso | iso_ddd | population | lat | lng | |
---|---|---|---|---|---|---|---|
'RO' | 'Alta Floresta D\'oeste' | 1100015 | '69' | 25578 | '-11.9287293' | '-61.9958651' | |
'RO' | 'Ariquemes' | 1100023 | '69' | 104401 | '-9.9061087' | '-63.0330263' | |
'RO' | 'Cabixi' | 1100031 | '69' | 6355 | '-13.4623774' | '-60.6285091' | |
'RO' | 'Cacoal' | 1100049 | '69' | 87226 | '-11.434693' | '-61.4566885' | |
'RO' | 'Cerejeiras' | 1100056 | '69' | 17986 | '-13.2109867' | '-61.2801996' | |
'RO' | 'Colorado do Oeste' | 1100064 | '69' | 18817 | '-13.1178429' | '-60.5459451' | |
'RO' | 'Corumbiara' | 1100072 | '69' | 8842 | '-12.9986334' | '-60.9460084' | |
'RO' | 'Costa Marques' | 1100080 | '69' | 16651 | '-12.4380262' | '-64.2268052' | |
'RO' | 'Espigão D\'oeste' | 1100098 | '69' | 32385 | '-11.5323149' | '-61.0169967' |
OlderNewer