Skip to content

Instantly share code, notes, and snippets.

View danwlsn's full-sized avatar

Danny Wilson danwlsn

  • Manchester, UK
View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@imathis
imathis / tweetbot-mute-regex.md
Created June 27, 2012 19:45
Tweetbot can use regular expressions to mute tweets in your timeline and mentions.

Hashtag abuse

Three or more hashtags.

#[^#]+#[^#]+#

Long hashtags (15+ characters): #hashtagpunchline

@Couto
Couto / raspberrypi_archlinux.md
Last active August 27, 2017 17:06
Raspberry Pi with ArchLinux
@jackcarter
jackcarter / slack_delete.py
Last active November 29, 2023 07:03
Delete Slack files older than 30 days. Rewrite of https://gist.github.com/jamescmartinez/909401b19c0f779fc9c1
import requests
import time
import json
token = ''
#Delete files older than this:
ts_to = int(time.time()) - 30 * 24 * 60 * 60
def list_files():
@roylee0704
roylee0704 / dockergrep.sh
Created December 9, 2016 08:24
how to grep docker log
docker logs nginx 2>&1 | grep "127."
# ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container
@akrabat
akrabat / ctags
Last active January 28, 2021 06:52
git hooks for ctags. Place in `.git_template/hooks/` & run: `git config --global init.templatedir '~/.git_template'`
#!/bin/sh
set -e
PATH="$HOME/bin:/usr/local/bin:$PATH"
mkdir .git/tags_lock 2>/dev/null || exit 0
trap 'rmdir .git/tags_lock; if [ -f .git/tags.$$ ]; then rm .git/tags.$$; fi' EXIT
# Assumes universal-ctags is on the path
ctags --tag-relative=yes -R -f .git/tags.$$
mv .git/tags.$$ .git/tags