Skip to content

Instantly share code, notes, and snippets.

@petrelharp
petrelharp / get-bibsonomy.sh
Created February 20, 2015 15:21
download all publications from bibsonomy as bibtex (even if there are more than 1000 of them)
#!/bin/bash
URL="http://www.bibsonomy.org/bib/user/peter.ralph?items=1000&bibtex.start="
OUTFILE="peter.ralph-bibsonomy-$(date '+%Y-%m-%d').bib"
TEMPFILE=$(mktemp "get-bib.tmpXXXX")
if [ -e $OUTFILE ]
then
echo "$OUTFILE already exists. Delete it first."
exit 1
@mwhite
mwhite / git-aliases.md
Last active June 18, 2024 05:31
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
@shhong
shhong / nsb_entropy.py
Last active May 19, 2023 11:45
NSB entropy in python
#!/usr/bin/env python
"""
nsb_entropy.py
June, 2011 written by Sungho Hong, Computational Neuroscience Unit, Okinawa Institute of
Science and Technology
May, 2019 updated to Python 3 by Charlie Strauss, Los Alamos National Lab
This script is a python version of Mathematica functions by Christian Mendl