Skip to content

Instantly share code, notes, and snippets.

cdesch cdesch

Block or report user

Report or block cdesch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cdesch
cdesch / rake task
Created Sep 29, 2016 — forked from mcansky/rake task
simple ruby git changelog generator
View rake task
# simple rake task to output a changelog between two commits, tags ...
# output is formatted simply, commits are grouped under each author name
#
desc "generate changelog with nice clean output"
task :changelog, :since_c, :until_c do |t,args|
since_c = args[:since_c] || `git tag | head -1`.chomp
until_c = args[:until_c]
cmd=`git log --pretty='format:%ci::%an <%ae>::%s::%H' --after=#{since_c} --before=#{until_c}`
entries = Hash.new
@cdesch
cdesch / accounts-models.py
Created Nov 30, 2012 — forked from erikankrom/accounts-models.py
Multiple Profiles for Internal/External Users
View accounts-models.py
from django.db import models
from django.contrib.auth import User
from mycompany.models import Client
from userprofiles.models import Profile
class External(Profile):
#External-specific models
client = models.ForeignKey(Client)
def __unicode__(self):
View jquery-instantsearch.js
$().ready(function(){
// Instant Search
$('#q').keyup(function(){
$('.search_item').each(function(){
var re = new RegExp($('#q').val(), 'i')
if($(this).children('.search_text')[0].innerHTML.match(re)){
$(this).show();
}else{
$(this).hide();
};
You can’t perform that action at this time.