Skip to content

Instantly share code, notes, and snippets.

View jtheoof's full-sized avatar

Jeremy Attali jtheoof

View GitHub Profile
"""
jQuery templates use constructs like:
{{if condition}} print something{{/if}}
This, of course, completely screws up Django templates,
because Django thinks {{ and }} mean something.
Wrap {% verbatim %} and {% endverbatim %} around those
blocks of jQuery templates and this will try its best
@MicahElliott
MicahElliott / colortrans.py
Created November 29, 2010 07:57
Convert values between RGB hex codes and xterm-256 color codes.
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code
@jtheoof
jtheoof / gist:2880413
Created June 6, 2012 07:23
pre-commit SVN hook to prevent a commit if Jenkins is building or build is broken
#!/bin/sh
# PRE-COMMIT HOOK
#
# The pre-commit hook is invoked before a Subversion txn is
# committed. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-commit' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH (the path to this repository)
@agnoster
agnoster / README.md
Last active April 6, 2024 22:35
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@hannu
hannu / gist:4604611
Last active August 30, 2022 08:31
Filter your own commit messages from git log and group by day. (Modified from http://stackoverflow.com/questions/2976665/git-changelog-day-by-day)
#!/bin/bash
AUTHOR=$(git config user.name)
DATE=$(date +%F)
git log --no-merges --format="%cd" --date=short --no-merges --author="$AUTHOR" --all | sort -u -r | while read DATE ; do
if [ $NEXT != "" ]
then
echo
echo [$NEXT]
fi
GIT_PAGER=cat git log --no-merges --format=" %s" --since=$DATE --until=$NEXT --author="$AUTHOR" --all
@pandasauce
pandasauce / radiff2.log
Last active September 22, 2020 14:22
Chrome 75.0.3770.142 font rendering fix
# 75.0.3770.142
0x04b58615 7626 => 9090 0x04b58615
0x04b5861d 31c0488945 => 9090909090 0x04b5861d
Due to a beautiful bug in Chromium, it turns out you don't need this binary patch and can **enable** subpixel positioning by asking Chrome **to disable it**: https://bugs.chromium.org/p/chromium/issues/detail?id=824153#c39
Needless to say, I won't be maintaining this gist any longer.