Skip to content

Instantly share code, notes, and snippets.

View patrickocoffeyo's full-sized avatar
🏠
Working from home

Patrick Coffey patrickocoffeyo

🏠
Working from home
View GitHub Profile

Keybase proof

I hereby claim:

  • I am patrickocoffeyo on github.
  • I am pscoffs (https://keybase.io/pscoffs) on keybase.
  • I have a public key ASAXR0y8dTfjN4tzD2r9xTkTvLmF9mqMzEyojZzEDqi0Ggo

To claim this, I am signing this object:

@patrickocoffeyo
patrickocoffeyo / trello-card-filter-by-assignee.js
Created March 10, 2016 18:20
Simple script that filters trello cards by assignee.
var myInitials = 'PC';
jQuery('.list-card').each(function(i, item) {
var $item = jQuery(item);
$item.find('.member').each(function(j, member) {
var $member = jQuery(member);
if ($member.text() !== myInitials) {
$item.remove();
}
})
});
@patrickocoffeyo
patrickocoffeyo / chooseLunch.js
Created February 17, 2016 22:52
Choose what to eat for lunch by rolling a jsdice.
/**
* @file
* Contains dice with n sides.
*/
'use strict';
/**
* Defines Dice class.
*
@patrickocoffeyo
patrickocoffeyo / drupal_solr_install
Last active August 29, 2015 14:19
Install Solr for Drupal
#!/usr/bin/env bash
function set_message() {
echo "### ### ### ###" >&2
echo "### $1" >&2
echo "### ### ### ###" >&2
echo " " >&2
}
# Installs and configures Tomcat.
@patrickocoffeyo
patrickocoffeyo / bootstrapblocks.make
Created March 18, 2014 19:22
BootstrapBlocks drush make file for Drupal 7.x
; Core version
; ------------
core = 7.x
; API version
; ------------
api = 2
; Core project
; ------------
@patrickocoffeyo
patrickocoffeyo / moment.period.coffee
Last active August 20, 2017 15:43
Year period management for moment.js. Requires the moment.js library. Default period is the standard US year divided into quarters.
moment.fn.periodStartDates = [
{month: 0, day: 1}
{month: 3, day: 1}
{month: 6, day: 1}
{month: 9, day: 1}
]
moment.fn.period = ->
period = Math.floor(this.month() / this.periodStartDates.length)
start = moment(_.extend(this.periodStartDates[period], {year: this.year()}))
@patrickocoffeyo
patrickocoffeyo / touchIcons.py
Created August 19, 2013 18:15
Turns an icon into website-ready touch icons.
#!/usr/bin/python
import sys
import optparse
import os
import Image
def main():
p = optparse.OptionParser()
p.add_option('--source', '-s', default='')
@patrickocoffeyo
patrickocoffeyo / installie.py
Last active December 21, 2015 03:19
Allows you to download/create an IE VM for Virtualbox in Linux easily.
#!/usr/bin/python
import sys
import optparse
import urllib
import urllib2
import os
import stat
def main():
@patrickocoffeyo
patrickocoffeyo / ios-sim-dockify.sh
Last active December 17, 2015 04:08
Adds the iOS Simulator to the dock. Xcode removes it on every update. Seriously Apple what the heck!
defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>"
killall Dock
@patrickocoffeyo
patrickocoffeyo / email.html
Last active December 12, 2015 01:38
Styling auto injected calendar and phone links in iOS and Mac Mail
<html>
<head>
<meta name="format-detection" content="telephone=no">
<style>
.mail-links a {
text-decoration: none!important;
color: #ffefc6!important;
font-weight: normal!important;
}
</style>