View gist:f79167b02fed63e4567798389934198e
https://julien.danjou.info/why-you-should-care-that-your-sql-ddl-is-transactional/ |
View karabiner.json
{ | |
"global": { | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": false | |
}, | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"parameters": { |
View gist:7002d49feb1827f1606b73315b7309ff
─roma@milushov ~ | |
╰─$ vim --version | |
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 5 2017 06:43:54) | |
MacOS X (unix) version | |
Included patches: 1-124 | |
Compiled by Homebrew | |
Huge version with MacVim GUI. Features included (+) or not (-): | |
+acl +find_in_path -mouse_sysmouse -tag_any_white | |
+arabic +float +mouse_urxvt +tcl | |
+autocmd +folding +mouse_xterm +termguicolors |
View .vimrc
Bundle 'gmarik/vundle' | |
Bundle 'scrooloose/nerdtree' | |
"Bundle 'tpope/vim-commentary' | |
"Bundle 'scrooloose/nerdcommenter' | |
Bundle 'kien/ctrlp.vim' | |
Bundle 'tommcdo/vim-exchange' | |
Bundle 'tpope/vim-unimpaired' | |
Bundle 'AndrewRadev/switch.vim' | |
Bundle 'Raimondi/delimitMate' |
View .vimrc
Bundle "mattn/pastebin-vim" | |
"Bundle 'mikewest/vimroom' | |
Bundle "pangloss/vim-javascript" | |
"g:javascript_conceal = 1 | |
"Bundle 'majutsushi/tagbar' |
View app.rb
require 'sinatra' | |
require 'json' | |
require 'faker' | |
POSITION = %w( | |
Новичок | |
Даритель | |
Наставник | |
Меценат | |
) |
View index.js
window._kaya_block_counter = window._kaya_block_counter || 1; | |
module.exports = { | |
uuid: function() { | |
return window._kaya_block_counter++; | |
}, | |
// http://youmightnotneedjquery.com/#parse_html | |
parseHTML: function(str) { | |
var tmp = document.implementation.createHTMLDocument(); |
View export-links-wtih-images.rb
require 'csv' | |
file = "#{Rails.root}/public/data_wheel_msk_actual.csv" | |
wi = WheelItem.includes(:wheel, :brand).joins(store_items: :store).where('quantity > 0').where(stores: {city_id: 1}).uniq; nil; | |
CSV.open( file, 'w' ) do |writer| | |
wi.each do |s| | |
path = app.catalog_wheel_wheel_item_path(s.brand,s.model,s.article.downcase) | |
writer << [s.article, "http://www.kamtex.ru#{path}", "http://www.kamtex.ru#{s.wheel.image.url}"] | |
end | |
end |
View stupid_arrange.rb
def self.stupid_arrange | |
arranged = ActiveSupport::OrderedHash.new | |
self.sorted.where(depth: 0).each do |item| | |
arranged[item] = [] | |
end | |
self.sorted.where(depth: 1).each do |item| | |
if key = arranged.find{ |k, _| k.id == 54 }.first | |
arranged[key].push(item) | |
end |
View .vimrc
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
Bundle 'gmarik/vundle' | |
Bundle 'scrooloose/nerdtree' | |
Bundle 'tpope/vim-commentary' | |
Bundle 'scrooloose/nerdcommenter' |
NewerOlder