Skip to content

Instantly share code, notes, and snippets.

View dayvonjersen's full-sized avatar

dayvonjersen dayvonjersen

View GitHub Profile
@srayhan
srayhan / effective-logging.rb
Created August 19, 2011 18:14
Effective logging example
#This is an example code showing a good mix of 4 levels (error, warn, info, and debug) of log messages
#follow the comments to understand the motivation behind each log messages
#please ignore the business logic or coding style, this is only meant to showcase logging only...:-)
#Language used is Ruby
def descope_multiple
begin
logger.debug("entering debug_multiple()...")
wis_to_descope = @project.work_items.find(params[:id])
@wis_descoped = []
@wis_not_descoped = []
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork [email protected]