Skip to content

Instantly share code, notes, and snippets.

View lukeholder's full-sized avatar
👋

Luke Holder lukeholder

👋
View GitHub Profile
@lukeholder
lukeholder / environment.md
Last active October 13, 2015 13:17
Luke Holder's Development Environment

Luke Holder's Development Environment.

Hardware

  • 15" Retina Macbook Pro
  • Thunderbolt Display
  • Apple Wireless Keyboard
  • Magic Mouse
@lukeholder
lukeholder / sharing.md
Created December 4, 2012 07:46 — forked from danott/sharing.md
Sharing Buttons Reference

Pinterest

Documentation

<!-- An individual link -->
<a href="http://pinterest.com/pin/create/button/?url=http%3A%2F%2Funitedway.com&media=http%3A%2F%2Fplacehold.it%2F200x200&description=A%20description." class="pin-it-button" count-layout="horizontal"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>

<!-- before </body> -->
@lukeholder
lukeholder / problem.ee
Created December 21, 2012 03:12
#eecms error
this works:
{exp:channel:entries channel="news" limit="10"}
<div class="item">
<div class="item-city">{title}</div>
<div class="votes"></div>
</div>
{/exp:channel:entries}
this does not:
@lukeholder
lukeholder / demo.rb
Created January 11, 2013 06:53
How to connect to Microsoft SQL Server with jruby on Windows using JDBC and Sequel Gem
require "java"
require "rubygems"
require "sequel"
require "sqljdbc4.jar" #this files path may need to be relevate to file location
DB = Sequel.connect(
:adapter => "jdbc",
:url => "jdbc:sqlserver://doric-server5;database=ADCData_Doric;integratedSecurity=true"
# This is using integrated security, might want to pass username and password
# More Info at http://sequel.rubyforge.org/rdoc/files/doc/opening_databases_rdoc.html
@lukeholder
lukeholder / test.rb
Created January 31, 2013 01:26
this is a test
def playing_with_sublime_text_gist_maker
puts "working?"
end
#!/usr/bin/env rake
require "bundler/gem_tasks"
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
<?php
namespace BlocksCommerce\Models;
use Blocks\AttributeType;
use Blocks\Blocks;
class PaymentMethodModel extends BaseModel
{
public function __toString()
@lukeholder
lukeholder / compare.html
Last active December 15, 2015 04:29
craft update form with GUID
THIS:
<form method="post" action="" accept-charset="UTF-8">
<input type="hidden" name="action" value="entries/saveEntry">
<input type="hidden" name="redirect" value="blog/{{ entry.slug }}">
<input type="hidden" name="GUID" value="{{ entry.guid }}">
<label for="title">Title</label>
<input id="title" type="text" name="title" value="{{ entry.title }}">
@lukeholder
lukeholder / regprob.rb
Last active December 15, 2015 13:09
reg prob
captionregex = Regexp.new('\[(\w*?)(.*?)\](.*?)\[\/\1\]')
body.gsub(captionregex, \3)
@lukeholder
lukeholder / temp.rb
Created March 29, 2013 11:33
trying to remove the shortcode tags
#!/bin/env ruby
# encoding: utf-8
text = <<-eos
blablablablabla<p>[caption id="attachment_7055" align="alignleft" width="205"]<a href="http://tenina.com/wp-content/uploads/2013/03/Bunny-with-eggs.jpg"><img class="size-medium wp-image-7055" alt="Little egg garden…hop a long bunny!" src="http://tenina.com/wp-content/uploads/2013/03/Bunny-with-eggs-205x300.jpg" width="205" height="300" /></a> Little egg garden…hop a long bunny![/caption]</p>blablablablabla
eos
newcaptionregex = Regexp.new('\[(\w*?)(.*?)\](.*?<word>)\[\/\1\]')
text.gsub!(newcaptionregex, "\\3")