Skip to content

Instantly share code, notes, and snippets.

View cdesch's full-sized avatar
🏠
Working from home

cdesch cdesch

🏠
Working from home
View GitHub Profile
@cdesch
cdesch / rake task
Last active July 18, 2021 16:16 — forked from mcansky/rake task
simple ruby git changelog generator
# 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 November 30, 2012 14:58 — forked from erikankrom/accounts-models.py
Multiple Profiles for Internal/External Users
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):
$().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();
};