Skip to content

Instantly share code, notes, and snippets.

View skrantzman's full-sized avatar

Steve Krantzman skrantzman

  • California Association of Oral & Maxillofacial Surgeons
  • Roseville, CA
View GitHub Profile
@heiswayi
heiswayi / repo-reset.md
Created February 5, 2017 01:32
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@nikolajbaer
nikolajbaer / gist:778800
Created January 13, 2011 23:03
Litttle jquery js script to create subtotals and totals for columns in a table. Essentially tag the col "td"s that you want to sum with the class sum, mark the col "td"s that you want to be subtotals with the class "subtotal", and mark the total row as cl
<html><head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
function tally (selector) {
$(selector).each(function () {
var total = 0,
column = $(this).siblings(selector).andSelf().index(this);
$(this).parents().prevUntil(':has(' + selector + ')').each(function () {