Skip to content

Instantly share code, notes, and snippets.

@endolith
endolith / Has weird right-to-left characters.txt
Last active April 30, 2024 12:48
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@johngibb
johngibb / install-git-completion.sh
Last active August 10, 2022 04:42
Mac OS X - Install Git Completion
URL="https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash"
PROFILE="$HOME/.profile"
echo "Downloading git-completion..."
if ! curl "$URL" --silent --output "$HOME/.git-completion.bash"; then
echo "ERROR: Couldn't download completion script. Make sure you have a working internet connection." && exit 1
fi
@manuelvanrijn
manuelvanrijn / git-large-files.pl
Created November 10, 2011 09:36
large files in git repositories history
#!/usr/bin/perl
use 5.008;
use strict;
use Memoize;
# usage:
# git-large-files 500k
# git-large-files 0.5m
# git-large-files 5b
@dcernst
dcernst / HWTemplate.tex
Last active April 23, 2024 05:19
LaTeX homework template for Weekly Homework assignments for Dana Ernst's courses.
% --------------------------------------------------------------
% This is all preamble stuff that you don't have to worry about.
% Head down to where it says "Start here"
% --------------------------------------------------------------
\documentclass[12pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath,amsthm,amssymb}
@dupuy
dupuy / README.rst
Last active May 5, 2024 18:42
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

@hrldcpr
hrldcpr / tree.md
Last active May 1, 2024 00:11
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@rduplain
rduplain / gist:2149194
Created March 21, 2012 16:19
PyCon 2012 Digest for WillowTree Apps

PyCon 2012 Digest

from DevOps team {rduplain,mattd,teebes}, to mobile developers at WillowTree Apps

Pronunciation

@imperialwicket
imperialwicket / setup.sql
Last active November 10, 2022 00:26
PostgreSQL monthly table partitions
--
-- DEPRECATED GIST
-- **** Moved to a repo: https://github.com/imperialwicket/postgresql-time-series-table-partitions ****
--
-- You should check the repository, this gist won't receive updates.
--
--
--
--
--
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 7, 2024 02:33
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@codeb2cc
codeb2cc / gist:3302754
Created August 9, 2012 09:48
Sqlalchemy get_or_create implement
# -*- coding: utf-8 -*-
from sqlalchemy.exc import IntegrityError
from sqlalchemy.sql.expression import ClauseElement
def _get_or_create(session, model, defaults=None, **kwargs):
try:
query = session.query(model).filter_by(**kwargs)
instance = query.first()