Skip to content

Instantly share code, notes, and snippets.

@sharipov-ru
sharipov-ru / bootstrap.markdown
Last active December 14, 2015 10:59
collection of useful bootstrap links

Twitter Bootstrap Useful Links

# change default PREFIX binding
set -g prefix C-w
unbind C-b
set -sg escape-time 1
set -g base-index 1
set -g pane-base-index 1
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind C-a send-prefix
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = blue bold
frag = magenta bold
old = red bold
alias gl='git log --graph --pretty="tformat:%C(yellow)%h%Creset %Cgreen(%ar)%Creset %C(bold blue)<%an>%Creset %C(red)%d%Creset %s"'
@sharipov-ru
sharipov-ru / gist:3866572
Created October 10, 2012 16:04
pdf cheatsheet

Compress PDF file with ghostscript

$ gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

Compression levels:

  • screen
  • ebook
  • printer
  • prepress
  • default
@sharipov-ru
sharipov-ru / gist:3653486
Created September 6, 2012 09:12
hominid send
h = Hominid::API.new(APP_CONFIG['mailchimp']['api_key'])
h.campaign_create('regular', {:list_id => 'da461e7340', :subject => 'new campaign',
:from_email => 'name@gmail.com',
:from_name => 'Dev' }, {:html => '<h1>LOL</h1>' })
h.campaign_send_now("7c0100f8e7")
@sharipov-ru
sharipov-ru / Old TableSorter Indicators
Created May 10, 2012 11:04 — forked from kylekeesling/Old TableSorter Indicators
Incorporate Bootstrap Styling into Sortable Table Helper
Link to older version of the asset on github:
https://github.com/twitter/bootstrap/raw/96c3e709963516a06ad6e723a7bba3fbf5fc1ba2/assets/img/tablesorter-indicators.png
@sharipov-ru
sharipov-ru / cool_routes.rake
Created April 5, 2012 18:06
rake routes with hirb
namespace :routes do
desc "cool routes"
task :cool => :environment do
require 'rails/application/route_inspector'
module Rails
class Application
class RouteInspector
include Hirb::Console
def formatted_routes(routes)
@sharipov-ru
sharipov-ru / devise.ru.yml
Created February 17, 2012 10:06 — forked from Antiarchitect/devise.ru.yml
Changes for compatibility with new Devise (removed deprecated translations)
# Русский перевод для https://github.com/plataformatec/devise/tree/v1.4.7
# Другие переводы на http://github.com/plataformatec/devise/wiki/I18n
ru:
errors:
messages:
expired: "устарела. Пожалуйста, запросите новую"
not_found: "не найдена"
already_confirmed: "уже подтверждена. Пожалуйста, попробуйте войти в систему"
not_locked: "не заблокирована"
# Русский перевод для https://github.com/plataformatec/devise/tree/v1.4.2
# Другие переводы на https://github.com/plataformatec/devise/wiki/I18n
ru:
errors:
messages:
expired: "устарела. Пожалуйста, запросите новую"
not_found: "не найдена"
already_confirmed: "уже подтверждена. Пожалуйста, попробуйте войти в систему"
not_locked: "не заблокирована"