Skip to content

Instantly share code, notes, and snippets.

View cellofellow's full-sized avatar
😀

Joshua Gardner cellofellow

😀
View GitHub Profile
@regulad
regulad / .env
Created June 18, 2023 21:54
SOCKS5 Proxy using Tailscale Exit Node
TS_AUTHKEY=ts-auth-yattayatta
@Voronenko
Voronenko / gitlab_get_last_artifact.sh
Created June 15, 2016 07:41
gitlab_get_last_artifact.sh
#!/bin/bash
# credits https://gitlab.com/morph027/gitlab-ci-helpers/blob/master/get-last-successful-build-artifact.sh
set -e
# don't forget to send ref
# BASE_URL=https://zzz.githost.io/
# PRIVATE_TOKEN=aaaaaaaa
# STAGE=build
# PROJECT=5
@ifduyue
ifduyue / add-git-aliases.sh
Last active October 11, 2021 02:31
git aliases
#!/bin/bash
set -x
# common shortcuts
git config --global alias.co checkout
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.br branch
git config --global alias.rb rebase
@tswaters
tswaters / git-subdirectory-tracking.md
Last active October 6, 2025 12:00
Adding subdirectory of a remote repo to a subdirectory in local repo

This is way more complicated than it should be. The following conditions need to be met :

  1. need to be able to track and merge in upstream changes
  2. don't want remote commit messages in master
  3. only interested in sub-directory of another repo
  4. needs to go in a subdirectory in my repo.

In this particular case, I'm interested in bringing in the 'default' template of jsdoc as a sub-directory in my project so I could potentially make changes to the markup it genereates while also being able to update from upstream if there are changes. Ideally their template should be a separate repo added to jsdoc via a submodule -- this way I could fork it and things would be much easier.... but, it is what it is.

After much struggling with git, subtree and git-subtree, I ended up finding this http://archive.h2ik.co/2011/03/having-fun-with-git-subtree/ -- it basically sets up separate branches from tracking remote, the particular sub-directory, and uses git subtree contrib module to pull it all togther. Following are

anonymous
anonymous / tmux.conf
Created September 9, 2014 18:35
vim friendly tmux configuration
#Prefix is Ctrl-a
set -g prefix C-a
bind C-a send-prefix
unbind C-b
set -sg escape-time 1
set -g base-index 1
setw -g pane-base-index 1
#Mouse works as expected
#!/bin/bash
# https://gist.github.com/salticus/9519167
# License GPLv3
# Create a svg representation of a django template inheritance tree
# use web browser, eog (if you're on ubuntu) or whatever to view
TEMPLATE_DIR=templates
DOT_DIR="$( pwd )"
@readevalprint
readevalprint / serializer.py
Created September 25, 2013 20:39
django-haystack SearchResultSerializer from django-rest-framework
==== SNIP ====
class DistanceSerializer(serializers.Serializer):
km = serializers.FloatField()
m = serializers.FloatField()
mi = serializers.FloatField()
ft = serializers.FloatField()
class SearchResultSerializer(serializers.Serializer):