Skip to content

Instantly share code, notes, and snippets.

View benregn's full-sized avatar

Tomas Thor Jonsson benregn

View GitHub Profile
# GIT heart FZF
# -------------
is_in_git_repo() {
git rev-parse HEAD > /dev/null 2>&1
}
fzf-down() {
fzf --height 50% --min-height 20 --border --bind ctrl-/:toggle-preview "$@"
}
@audreyfeldroy
audreyfeldroy / pypi-release-checklist.md
Last active February 6, 2025 19:57
My PyPI Release Checklist
  • Update HISTORY.md
  • Commit the changes:
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be minor or major)
bumpversion patch
@cuppster
cuppster / getcomics.py
Created January 30, 2013 06:18
Mini-framework for scraping web pages with python using PyQuery, decorators and generators.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, re
import itertools
from functools import wraps
from pyquery import PyQuery as pq
class scrape:
@Nurdok
Nurdok / python_conversion.md
Last active February 5, 2025 05:47
Python Conversion

Python Number Conversion Chart

From To Expression
@mrjoes
mrjoes / INSTALL.txt
Last active February 2, 2018 21:25
Dead simple broker on top of sockjs-tornado
1. pip install -r reqs.pip
2. server.py
3. open client.html in browser
4. redis-cli publish push '123456'
5. check browser console
@evildmp
evildmp / gist:3094281
Last active June 30, 2023 10:55
Set up Django, nginx and uwsgi

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@hrldcpr
hrldcpr / tree.md
Last active January 6, 2025 22:43
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!

@rapimo
rapimo / rails_start.scpt
Created February 21, 2012 17:18
iterm2 AppleScript for my Rails Project
-- ~/Library/Application\ Support/iTerm/Scripts/setup_rails.scpt
-- Thanks to http://www.worldgoneweb.com/2011/iterm2-advanced-features/#comment-20560
-- http://www.iterm2.com/#/section/documentation/scripting
tell application "iTerm"
activate
set myterm to (make new terminal)
set cd_to_my_project_path to ("cd ~/Projekte/my_awesome_project")
-- you can altenativly tell the first terminal
tell the first terminal
launch session "Panes"
@entaroadun
entaroadun / gist:1653794
Created January 21, 2012 20:10
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation: