Skip to content

Instantly share code, notes, and snippets.

@rbf
rbf / README.md
Last active December 20, 2015 10:48
Shell tool to get the permalink of a gist raw file at given commit or tag at https://gist.github.com.

Description

Shell tool to get the permalink of a gist raw file at given commit or tag at https://gist.github.com.

Installation

To install this tool (v2.0) directly to your /usr/local/bin you can use following command (you might need to be root to execute it):

@rbf
rbf / README.md
Last active December 20, 2015 09:58
One-liner to obtain the public ssh key, creating it in the way if not present.
@rbf
rbf / README.md
Last active November 15, 2024 10:07
Script to recursively generate PDF files from markdown files in the current directory and its subfolders using "pandoc".

%process-md % https://gist.github.com/rbf/6064734

Description

process-md is a bash tool to recursively generate files from markdown files in other formats using pandoc, which is assumed installed. By default (i.e. calling command tool with no arguments) it processes all markdown files in the current directory and places the resulting PDF files in a ./target directory.

@rbf
rbf / install-subl-config.sh
Created July 22, 2013 14:55
Capture config for Sublime Text 2 into Dropbox, or install it to the current user if already captured.
#!/bin/sh
# The MIT License (MIT)
#
# Copyright (c) 2013 https://gist.github.com/rbf
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
@rbf
rbf / README.md
Last active May 17, 2016 13:05
Bash script to (re)create a set of issue labels in a GitHub repo at once.

Description

Bash script to (re)create a set of issue labels in a GitHub repo at once. This is very handy when we want to replicate a set of labels every time we create a new repo. The repo can be public or private, and belonging to your user or to an organisation your user belongs to.

_Note: The script aims also to be one example of bash

@rbf
rbf / install-opscenter.sh
Created October 11, 2012 12:58
Install OpsCenter from DataStax
#!/bin/bash
# Run this script directly with:
# bash <(curl -sSL https://raw.github.com/gist/3872107/install-opscenter.sh)
OPSCENTER_NAME="opscenter"
OPSCENTER_TARBALL_NAME="$OPSCENTER_NAME.tar.gz"
echo
echo "Installing OpsCenter (last stable version)"
@rbf
rbf / install-cassandra.sh
Created October 9, 2012 14:58
Install Cassandra
#!/bin/bash
# Run this script directly with:
# bash <(curl -sSL https://raw.github.com/gist/3859355/install-cassandra.sh)
CASSANDRA_FILE_NAME="apache-cassandra"
CASSANDRA_VERSION="${1:-1.1.5}" # By default install 1.1.5, the last stable release as of 09oct2012
CASSANDRA_DIR=$CASSANDRA_FILE_NAME-$CASSANDRA_VERSION
CASSANDRA_TARBALL_NAME=$CASSANDRA_DIR-bin.tar.gz
@rbf
rbf / .tmux.conf
Last active October 9, 2021 19:31
tmux config file
# To download and install this file to your home folder run the following command:
# cp -v ~/.tmux.conf ~/.tmux.conf.backup_$(date +"%Y%m%d%H%M%S"); curl https://gist.githubusercontent.com/rbf/3529029/raw/.tmux.conf -o ~/.tmux.conf
# To download and install this file for all users run the following command:
# cp -v /etc/tmux.conf /etc/tmux.conf.backup_$(date +"%Y%m%d%H%M%S"); curl https://gist.githubusercontent.com/rbf/3529029/raw/.tmux.conf -o /etc/tmux.conf
# The command 'reattach-to-user-namespace' allow to use tools like 'pbcopy' or 'subl .' within tmux.
# SOURCE: https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/blob/master/Usage.md#cross-platform-conditional-usage
if-shell '[ -z "${C9_USER}" ]' "set-option -g default-command 'command -v reattach-to-user-namespace >/dev/null && exec reattach-to-user-namespace -l \"$SHELL\" || exec \"$SHELL\"'"
@rbf
rbf / .vimrc
Last active October 9, 2021 20:08
My vimrc config
" Installation notes:
" 1. Download this .vimrc with 'curl -sSL rbf.li/vimrc -o .vimrc'
" 2. Install Pathogen, see https://github.com/tpope/vim-pathogen#installation
" 3. Install the solarized theme, see https://github.com/altercation/vim-colors-solarized#option-2-pathogen-installation-recommended
" 4. Enjoy
" URL: http://vim.wikia.com/wiki/Example_vimrc
" Authors: http://vim.wikia.com/wiki/Vim_on_Freenode
" Description: A minimal, but feature rich, example .vimrc. If you are a
" newbie, basing your first .vimrc on this file is a good choice.
@rbf
rbf / gist:3181725
Created July 26, 2012 12:19
Get leiningen
# Following instruction from http://leiningen.org/
# Download the 2.x preview release, which is recommended as of 26jul2012, to your $PATH (here using /usr/local/bin)
sudo curl -L -o '/usr/local/bin/lein' 'https://raw.github.com/technomancy/leiningen/preview/bin/lein'
# For the 1.x stable release run instead:
sudo curl -L -o '/usr/local/bin/lein' 'https://raw.github.com/technomancy/leiningen/stable/bin/lein'
# Set it to be executable
sudo chmod a+x /usr/local/bin/lein