Skip to content

Instantly share code, notes, and snippets.

View jrumbut's full-sized avatar

Joshua Rumbut jrumbut

  • UMass Chan Medical School
  • Worcester, MA
View GitHub Profile
@jrumbut
jrumbut / reload-nginx.sh
Last active August 30, 2021 18:11
Reload nginx process manually by sending HUP signal
#!/bin/bash
kill -HUP `cat /var/run/nginx.pid`
Image: /Users/joshuar/Desktop/Screen Shot 2015-07-16 at 5.00.32 PM.png
Format: PNG (Portable Network Graphics)
Mime type: image/png
Class: DirectClass
Geometry: 2032x1192+0+0
Units: Undefined
Type: TrueColorAlpha
Endianess: Undefined
Colorspace: sRGB
Depth: 8-bit
@jrumbut
jrumbut / clear-zend-cache.vim
Last active August 29, 2015 14:24
Clear Zend cache files out of /tmp with a single command
nnoremap tt ! rm /tmp/zend* <CR>
@jrumbut
jrumbut / Readme.md
Last active August 29, 2015 14:24
Draft Plugin Description

ElderLawAnswers Post Importer

  • Contributors: ElderLawAnswers
  • Author link: http://www.elderlawanswers.com/
  • Tags: rss, legal, import, feed, autoblog, attorney, aggregation, expert content, elder, law, syndication, content, feed import, feed to post, rss to post, content curation
  • Requires at least: 3.5
  • Tested up to: 4.2.2
  • Stable tag: 1.0.0
  • License: GPLv2 or later
  • License URI: http://www.gnu.org/licenses/gpl-2.0.html
@jrumbut
jrumbut / logo-white-transparent.sh
Created June 29, 2015 13:22
Take file, turn everything not white white or transparent
#! /bin/bash
convert <input-image> -alpha extract -threshold 0 -transparent black <out-file>
@jrumbut
jrumbut / install-ansible-on-ubuntu.sh
Last active August 29, 2015 14:21
Install Ansible on Ubuntu
#!/bin/bash
# Installs latest version of Ansible through apt
sudo apt-get install software-properties-common && sudo apt-add-repository ppa:ansible/ansible && sudo apt-get update && sudo apt-get install ansible
@jrumbut
jrumbut / top-ten-files.sh
Created May 13, 2015 13:23
List top ten largest files recursively from the current directory
find . -type f -ls | awk '{print $7" "$11}' | sort -nr | head -n 10
@jrumbut
jrumbut / install-magento.sh
Created November 13, 2013 00:12
The following prepares an Ubuntu 12.04 box for running Magento. Inspired by David T Sadler's helpful tutorial found here: http://davidtsadler.com/archives/2012/06/03/how-to-install-magento-on-ubuntu/
sudo apt-get update
sudo apt-get install apache2 -y
sudo a2enmod rewrite
sudo apt-get install php5 php5-curl php5-gd php5-mcrypt php5-mysql -y
sudo apt-get install mysql-server -y
sudo bash -c "cat >> /etc/apache2/sites-available/magento-default <<EOF
<VirtualHost *:80>
DocumentRoot /var/www/magento
#!/usr/bin/env ruby
# List all keys stored in memcache.
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place.
# Credit to @bkimble for the original script
# Blame to @jrumbut for adding content dumping
require 'net/telnet'
headings = %w(id expires bytes cache_key content)
@jrumbut
jrumbut / DeleteCell.coffee
Created July 8, 2013 22:27
A content-free cell made just to delete the row that contains it using the fabulous Backgrid.js library.
DeleteCell = Backgrid.Cell.extend({
template: _.template('<button>Delete</button>')
events:
"click": "deleteRow"
deleteRow: (e) ->
e.preventDefault()
@model.collection.remove(@model)
render: ->
@$el.html(@template())
@delegateEvents()