Setting your branch to exactly match the remote branch:
git fetch origin
git reset --hard origin/master
awk -F'[ :,]' '{a[$1":"$2"["$10 "["$16"]"]++}END{for(i in a){if(a[i] > 3){print i "-" a[i]}}}' dups.log | |
awk -F'[ :,]' '{print $1":"$2":"$3"["$10 "["$16"]"}' dups.log |
class Gracefully | |
class << self | |
alias_method :handle, :new | |
end | |
attr_reader :error, :value | |
def initialize | |
@value = nil | |
@error = nil |
# Bulky | |
# | |
# Bulky is a simple ActiveRecord extension to insert or update a bulk of rows in a single statement. | |
# | |
module Bulky | |
# Bulk insert multiple rows into a table | |
# | |
# Usage: | |
# | |
# Post.bulk_insert(['name', 'label'], [['ch', 'Label 1'], ['ch_2', 'Label 2']]) |
class Gracefully | |
class << self | |
alias_method :handle, :new | |
end | |
attr_reader :error, :value | |
# Accepts a block, invokes it, and wraps the return value in an | |
# exception-free `Gracefully` object | |
# |
require 'ruby-prof' | |
# | |
# This will use ruby-prof and print in a nice way. | |
# | |
# Input params: | |
# file_name = File name of output | |
# printer = graph || flat || stack | |
# | |
# Output format: | |
# E.g.: |
class NumFeels | |
attr_reader :number | |
def initialize(number) | |
@number = number | |
end | |
def happy? | |
fail ArgumentError if number < 0 | |
sum = 0 |
git fetch origin
git reset --hard origin/master
class AutocompleteSearch | |
class << self | |
def populate(query_scope) | |
query_scope.find_each do |item| | |
name = item.label | |
json_data = format_data(item) | |
name.length.times do |n| | |
key = name[0, n+1] | |
$redis.zadd "kupsearch:#{key.downcase}", 1, json_data | |
end |
{ | |
"auto_complete_commit_on_tab": true, | |
"caret_style": "solid", | |
"color_scheme": "Packages/User/RailsCastsColorScheme (SL).tmTheme", | |
"draw_white_space": "all", | |
"enable_tab_scrolling": false, | |
"ensure_newline_at_eof_on_save": true, | |
"file_exclude_patterns": | |
[ | |
"*.pyc", |
Documentation: | |
Enabled: false | |
AllCops: | |
Include: | |
- '**/Rakefile' | |
- '**/config.ru' | |
Exclude: | |
- 'db/**/*' | |
- 'test/test_helper.rb' | |
- 'spec/spec_helper.rb' |