Skip to content

Instantly share code, notes, and snippets.

View davep's full-sized avatar
👁️‍🗨️
Nothing like the eve of extinction to bring focus to the mind.

Dave Pearson davep

👁️‍🗨️
Nothing like the eve of extinction to bring focus to the mind.
View GitHub Profile
@ivan-krukov
ivan-krukov / emacs-animations.el
Created April 25, 2020 01:19
Emacs-mac animations
;; animations
;; Requires =emacs-mac= fork
;; repo: https://bitbucket.org/mituharu/emacs-mac
;; homebrew tap: https://github.com/railwaycat/homebrew-emacsmacport
;; Crazy example
(mac-start-animation nil :type 'page-curl-with-shadow
:duration 1.0 :direction 'right :angle 45)
;; Less crazy
(mac-start-animation (selected-window) :type 'move-out
@lmintmate
lmintmate / own-commit-emoji-system.md
Last active February 16, 2022 22:13
My own commit emoji system

lmintmate's commit emoji system

Geared for dotfile and colorscheme tinkerers.

I wasn't satisfied by the existing emoji commit standards, because they are more geared towards coders than people just maintaining dotfiles and only occasionally contributing a bug report or a piece of documentation (e.g. I don't need an emoji for tests, because I don't do any).

Here is my own standard, modelled after my own usage (feel free to use it as well if you want):

  • 🎬 :clapper: = Initial commit1
  • 🆕 :new: = Add stuff
  • 🗑️ :wastebasket: = Remove stuff
@dvdbng
dvdbng / zsh_to_fish.py
Created December 21, 2016 18:02
Migrate zsh history to fish
import os
import re
def zsh_to_fish(cmd):
return (cmd.replace('&&', '; and ')
.replace('||', '; or '))
def is_valid_fish(cmd):
@bskinn
bskinn / intersphinx_mappings.txt
Last active May 3, 2024 09:39
Various intersphinx mappings
# The entries in this file are checked regularly for validity via the Github Action
# sited at github.com/bskinn/intersphinx-gist.
# Please feel free to post an issue at that repo if any of these mappings don't work for you,
# or if you're having trouble constructing a mapping for a project not listed here.
Python 3 [latest]: ('https://docs.python.org/3/', None)
Python 3 [3.x]: ('https://docs.python.org/3.9/', None)
attrs [stable]: ('https://www.attrs.org/en/stable/', None)
Django [dev]: ('https://docs.djangoproject.com/en/dev/', 'https://docs.djangoproject.com/en/dev/_objects/')
Flask [2.2.x]: ('https://flask.palletsprojects.com/en/2.2.x/', None)
@parmentf
parmentf / GitCommitEmoji.md
Last active May 28, 2024 14:46
Git Commit message Emoji
@Jaza
Jaza / Private-pypi-howto
Last active July 2, 2023 16:24
Guide for how to create a (minimal) private PyPI repo, just using Apache with directory autoindex, and pip with an extra index URL.
*
@timonwong
timonwong / mysqldump.py
Created February 27, 2015 01:46
django mysqldump management command
# -*- coding: utf-8 -*-
import os
import sys
from optparse import make_option
from django.core.management.base import BaseCommand
from django.core.management.base import CommandError
from django.db import connections
from django.db import DEFAULT_DB_ALIAS
from django.db.backends import BaseDatabaseClient
@chaitanyagupta
chaitanyagupta / _reader-macros.md
Last active May 19, 2024 19:25
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on lisper.in.

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.