Setting your branch to exactly match the remote branch:
git fetch origin
git reset --hard origin/master
# frozen_string_literal: true | |
# Usage: | |
# class ServiceX | |
# include UnderscoreLog | |
# | |
# def initialize | |
# end | |
# | |
# def call |
# frozen_string_literal: true | |
module Jotter | |
def jot_info(tag = '') | |
Rails.logger.tagged(facility + " #{tag}") do | |
Rails.logger.info { yield } | |
end | |
end | |
def jot_debug(tag = '') |
[user] | |
name = Kat Padilla | |
email = hello@******.ph | |
[core] | |
excludesfile = /Users/katpadi/.gitignore_global | |
[difftool "sourcetree"] | |
cmd = opendiff \"$LOCAL\" \"$REMOTE\" | |
path = | |
[mergetool "sourcetree"] | |
cmd = /Applications/Sourcetree 3.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" |
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