Skip to content

Instantly share code, notes, and snippets.

View hardyoyo's full-sized avatar
🕺
husslin'

Hardy Pottinger hardyoyo

🕺
husslin'
View GitHub Profile
@nazgob
nazgob / ctags.setup
Created January 6, 2012 13:44
ctags setup on mac
# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"
@jpfuentes2
jpfuentes2 / rbenv-install-system-wide.sh
Created March 8, 2012 19:47
CentOS: rbenv install and system wide install
#!/bin/bash
# CentOS rbenv system wide installation script
# Forked from https://gist.github.com/1237417
# Installs rbenv system wide on CentOS 5/6, also allows single user installs.
# Install pre-requirements
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
make bzip2 autoconf automake libtool bison iconv-devel git-core
@eriwen
eriwen / pre-commit
Last active January 13, 2021 08:22
Pre-commit git hook for tracking new TODO/FIXME comments
#!/usr/bin/ruby
$refname = ARGV[0]
$oldrev = ARGV[1]
$newrev = ARGV[2]
def tasks
puts 'Checking TODOs...'
todo_pattern = /^\s*\+\s*([\/\#]+|<\!\-\-)\s*(FIXME|TODO)\W*([\s\w]+)(\-\->)?$/
# Find task-oriented comments added with this commit
@dchud
dchud / dspace-4.0-bin-install-guide
Last active August 29, 2015 13:56
20-minute guide to installing DSpace-4.0 from binary release on Ubuntu 12.04 LTS
# dchud's 20 minute guide to installing DSpace 4.0 from the binary release
# on a clean ubuntu 12.04 server running on aws ec2 or where-have-you
#
# this guide assumes you are already comfortable with *nix system administration
#
# this guide leaves out anything to do with the many details of configuring
# DSpace itself; it just gets you to the "it's up and running" step
#
# to start: get your clean ubuntu-12.04 system up to date
$ sudo apt-get update && sudo apt-get upgrade
@jkr
jkr / numerical-reference.hs
Created August 23, 2014 12:56
Numerical references to sections in pandoc. To be used with `--number-sections`
{-# LANGUAGE PatternGuards #-}
{- This filter allows for numerical section references. It should be
used with "--number-sections", since it uses a similar numbering
scheme. It works by using the link notation: given a header with a
given id, we can refer to that number by using a link with `#` in it:
My Header {#my-header-id}
=========
@mwoodiupui
mwoodiupui / dsctx
Last active August 29, 2015 14:05
Shell script to create customized Tomcat Context descriptors for a DSpace instance
#! /bin/sh
# Copyright 2014 Indiana University
# Mark H. Wood, IUPUI University Library
### Configure me!
DSHOME="${HOME}/dspaces"
DBMS='postgresql'
DB_HOST=localhost
@wesleyit
wesleyit / crontab_header.sh
Created September 26, 2014 20:03
A default crontab header that will make the life easier for those who don't remember cron fields or keywords.
## CRONTAB HINTS AND TIPS
##
##
## Entry Description Equivalent To
## @yearly (or @annually) Run once a year at midnight in the morning of January 1 0 0 1 1 *
## @monthly Run once a month at midnight in the morning of the first of the month 0 0 1 * *
## @weekly Run once a week at midnight in the morning of Sunday 0 0 * * 0
## @daily Run once a day at midnight 0 0 * * *
## @hourly Run once an hour at the beginning of the hour 0 * * * *
## @reboot Run at startup @reboot
@kardeiz
kardeiz / gist:c8ab990614dbbcb31213
Created November 11, 2014 16:33
script to output DSpace resource policy info
#!/bin/env jruby
require 'csv'
DSPACE_CFG = 'path to your dspace.cfg'
DSPACE_DIR = File.expand_path('../..', DSPACE_CFG)
DSPACE_JARS = Dir[File.join(DSPACE_DIR, 'lib/*.jar')]
ADMIN_EMAIL = 'your admin email'
OUTPUT = '/tmp/rp.csv'
#!/bin/sh
#
# Author: Ivan Masar, 2015
# License: public domain
#
# list running VMs by name
# for each VM print selected fields from vminfo
# format it into a table (using "column")
print_header=1
@ninabreznik
ninabreznik / gist:9f3799df31e66b9010b6403309dce687
Last active October 24, 2017 16:37
RAILS Cheat Sheet (BACKUP)
RAILS Cheat Sheet!
########################################
Rails Tutorial/Chapter 1
RUN A LOCAL SERVER
$ rails server
CHECK VERSION OF RUBY
$ ruby -v