Skip to content

Instantly share code, notes, and snippets.

View bishopandco's full-sized avatar
😈
CRUSHMODE

Michael Bishop bishopandco

😈
CRUSHMODE
View GitHub Profile
@bishopandco
bishopandco / nginx
Created November 27, 2014 17:15
nginx init.d script
#!/bin/sh
. /etc/rc.d/init.d/functions
. /etc/sysconfig/network
[ "$NETWORKING" = "no" ] && exit 0
nginx="/opt/nginx/sbin/nginx"
prog=$(basename $nginx)
NGINX_CONF_FILE="/opt/nginx/conf/nginx.conf"
li.product_customizations.collect{|x| x.customized_product_options if x.customized_product_options.last.customizable_product_option_id == 3}.reject{|x| x == nil}
=> [[#<Spree::CustomizedProductOption id: 740, product_customization_id: 731, customizable_product_option_id: 3, value: "https://signaturesettings-artwork.s3.amazonaws.com/...", created_at: "2013-06-21 14:58:56", updated_at: "2013-06-21 14:58:56", customization_image: nil>]]
Spree::OrdersController.class_eval do
before_filter :my_action
def my_action
logger.debug "hey look at me!"
end
end
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'tpope/vim-fugitive'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<!--[if lte IE 8]>
<script type="text/javascript" src="http://webmonarch.github.com/d34raphael/d3/lib/sizzle/sizzle.js"></script>
<script type="text/javascript" src="http://webmonarch.github.com/d34raphael/d3/lib/ie8/compat.js"></script>
<![endif]-->
<script type="text/javascript" src="http://webmonarch.github.com/d34raphael/d3/lib/raphael/raphael.js"></script>
<script type="text/javascript" src="http://webmonarch.github.com/d34raphael/d3/d3.v2.js"></script>
@bishopandco
bishopandco / index.html
Created December 5, 2012 01:39 — forked from mbostock/.block
Curved textPath
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<!--[if lte IE 8]>
<script type="text/javascript" src="http://webmonarch.github.com/d34raphael/d3/lib/sizzle/sizzle.js"></script>
<script type="text/javascript" src="http://webmonarch.github.com/d34raphael/d3/lib/ie8/compat.js"></script>
<![endif]-->
<script type="text/javascript" src="http://webmonarch.github.com/d34raphael/d3/lib/raphael/raphael.js"></script>
<script type="text/javascript" src="http://webmonarch.github.com/d34raphael/d3/d3.v2.js"></script>
@bishopandco
bishopandco / .vimrc
Created October 9, 2012 01:33
My vimrc
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'tpope/vim-fugitive'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
@bishopandco
bishopandco / message_theme.rb
Created September 6, 2012 03:00
Message Theming
class MessageTheme
def self.message_theming(week,year)
TwitterWeeklySampleMessage.primary_key="id"
BlogWeeklySampleMessage.primary_key="id"
FacebookWeeklySampleMessage.primary_key="id"
weekly_samples = WeeklySample.includes({:property => :tags}, :facebook_weekly_sample_messages, :blog_weekly_sample_messages, :twitter_weekly_sample_messages).where(:week_number => week,:year => year)
@bishopandco
bishopandco / map.js
Created June 27, 2012 17:18
Google Map Theme
[
{
featureType: "road",
stylers: [
{ visibility: "simplified" }
]
},{
featureType: "poi.park",
elementType: "labels",
stylers: [
map.connect "faqs.html", :controller => "main", :action =>"faqs"