Skip to content

Instantly share code, notes, and snippets.

View mfcovington's full-sized avatar

Mike Covington mfcovington

View GitHub Profile
# source:
# https://discussions.apple.com/message/32354266#message32354266
sudo mdutil -Ea
sudo mdutil -ai off
sudo mdutil -ai on
@brookinc
brookinc / stashstaged.sh
Last active November 23, 2021 09:34
A script to `git stash` only the currently staged changes.
#!/usr/bin/env bash
# This script stashes the currently staged changes, and leaves everything else in the working directory as-is.
# (source: https://stackoverflow.com/questions/14759748/stashing-only-staged-changes-in-git-is-it-possible/39644782#39644782)
# Prompt for the desired repo path
REPOPATH=
read -p "Enter the repo path, or press ENTER for current dir: " REPOPATH
# Read the desired stash description from the command line, or prompt the user for it if necessary
@buonzz
buonzz / update_java.sh
Last active May 24, 2021 21:22
update java 7 to 8 Centos
sudo yum remove java-1.7.0-openjdk
cd ~
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jre-8u91-linux-i586.rpm"
sudo yum localinstall jre-8u91-linux-i586.rpm
rm ~/jre-8u91-linux-i586.rpm
@alexclifford
alexclifford / s3_set_object_public.sh
Created July 24, 2015 01:59
Make S3 object public and private via s3cmd command line
s3cmd setacl s3://bucket/path/to/file --acl-public
s3cmd info s3://bucket/path/to/file
s3cmd setacl s3://bucket/path/to/file --acl-private
@soin08
soin08 / gulpfile.js
Last active December 4, 2023 22:33
Gulpfile.js to use with Django projects. Based on gulpfile.js from Google Web Starter Kit.
//Based on gulpfile.js from Google Web Starter Kit.
//https://github.com/google/web-starter-kit
'use strict';
// Include Gulp & Tools We'll Use
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var del = require('del');
var runSequence = require('run-sequence');
var browserSync = require('browser-sync');
@slowkow
slowkow / hg19.rRNA.interval_list
Last active April 9, 2023 14:56
Make a ribosomal RNA interval_list for Picard Tools CollectRnaSeqMetrics
@SQ SN:chrM LN:16571
@SQ SN:chr1 LN:249250621
@SQ SN:chr2 LN:243199373
@SQ SN:chr3 LN:198022430
@SQ SN:chr4 LN:191154276
@SQ SN:chr5 LN:180915260
@SQ SN:chr6 LN:171115067
@SQ SN:chr7 LN:159138663
@SQ SN:chr8 LN:146364022
@SQ SN:chr9 LN:141213431
@bt5e
bt5e / gist:7507535
Last active November 2, 2024 07:43
Markdown subscript and superscript

Testing subscript and superscript

Testing subscript subscript level 2

Testing superscript superscript level 2

@hubgit
hubgit / doi-to-bibtex.sh
Last active December 14, 2015 02:19
Fetch a BibTeX record for a DOI
curl --location --header 'Accept: application/x-bibtex' 'http://dx.doi.org/10.1371/journal.pone.0013982'
# redirects to
curl --header 'Accept: application/x-bibtex' 'http://data.crossref.org/10.1371/journal.pone.0013982'
@derek-schaefer
derek-schaefer / replace.py
Created October 4, 2012 17:05
Django template tag for replacing substrings
from django.template import Library, Node, Variable, \
VariableDoesNotExist, TemplateSyntaxError
register = Library()
def get_var(v, context):
try:
return v.resolve(context)
except VariableDoesNotExist:
return v.var
@troelskn
troelskn / app.rb
Last active August 12, 2021 17:25 — forked from dstrelau/app.rb
Gollum protected by HTTP Basic
require 'gollum/frontend/app'
require 'digest/sha1'
class App < Precious::App
User = Struct.new(:name, :email, :password_hash, :can_write)
before { authenticate! }
before /^\/(edit|create|delete|livepreview|revert)/ do authorize_write! ; end
helpers do