Skip to content

Instantly share code, notes, and snippets.

Patrick Coffey patrickocoffeyo

Block or report user

Report or block patrickocoffeyo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

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 Mar 10, 2016
Simple script that filters trello cards by assignee.
View trello-card-filter-by-assignee.js
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 Feb 17, 2016
Choose what to eat for lunch by rolling a jsdice.
View chooseLunch.js
/**
* @file
* Contains dice with n sides.
*/
'use strict';
/**
* Defines Dice class.
*
@patrickocoffeyo
patrickocoffeyo / drupal_solr_install
Last active Aug 29, 2015
Install Solr for Drupal
View drupal_solr_install
#!/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 Mar 18, 2014
BootstrapBlocks drush make file for Drupal 7.x
View bootstrapblocks.make
; Core version
; ------------
core = 7.x
; API version
; ------------
api = 2
; Core project
; ------------
@patrickocoffeyo
patrickocoffeyo / moment.period.coffee
Last active Aug 20, 2017
Year period management for moment.js. Requires the moment.js library. Default period is the standard US year divided into quarters.
View moment.period.coffee
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 Aug 19, 2013
Turns an icon into website-ready touch icons.
View touchIcons.py
#!/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 Dec 21, 2015
Allows you to download/create an IE VM for Virtualbox in Linux easily.
View installie.py
#!/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 Dec 17, 2015
Adds the iOS Simulator to the dock. Xcode removes it on every update. Seriously Apple what the heck!
View ios-sim-dockify.sh
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 Dec 12, 2015
Styling auto injected calendar and phone links in iOS and Mac Mail
View email.html
<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>
You can’t perform that action at this time.