Skip to content

Instantly share code, notes, and snippets.

@scharan
scharan / diff.js
Created October 10, 2011 06:12
JS & CSS to display 'side-by-side' diff for Gitweb.
// See http://saicharan.in/blog/2011/10/09/gitweb-with-sidebyside-diff/
$(document).ready(function() {
// Assumption: rem for left file, add for right file.
// => This follows from the assumption that additions
// are possible only for the right file.
$(".patch").each( function( name ) {
$.divp = $('<div/>', { class: "patch", id: $(this).attr('id') }); // div patch
$.diva = $('<div/>', { class: "patch a", id: $(this).attr('id')+'-a' }); // div for left file
$.divb = $('<div/>', { class: "patch b", id: $(this).attr('id')+'-b' }); // div for right file
@scharan
scharan / jekyll.el
Created August 25, 2011 19:30
Now adds a date: field when publishing (Original: https://github.com/metajack/jekyll/blob/master/emacs/jekyll.el)
;; jekyll.el
;;
;; Emacs support for Jekyll blogs.
;;
;; To use, just put this file somewhere in the load path and
;; (require 'jekyll)
;;
;; Here are my key bindings:
;; C-c b d - Show all drafts
;; C-c b p - Show all posts