Skip to content

Instantly share code, notes, and snippets.

View coreymartella's full-sized avatar

Corey Martella coreymartella

  • Waterloo, Ontario, Canada
View GitHub Profile
@coreymartella
coreymartella / .gitignore
Last active August 16, 2023 14:32
Shopify Order Exporter
*.csv*
*.zip*
@coreymartella
coreymartella / index.html
Created July 19, 2017 18:08 — forked from tomhodgins/html-tooltips.html
HTML inside Bootstrap tooltips
<!DOCTYPE html>
<html>
<head>
<title>Tooltip HTML Styles</title>
<!-- Bootstrap: with responsive, no icons -->
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<!-- FontAwesome -->
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css" rel="stylesheet">
@coreymartella
coreymartella / index.md
Last active September 7, 2017 14:40 — forked from tobyhede/gist:3179978
Date format cheat sheet

Server Side (Ruby)

From http://linux.die.net/man/3/strftime

  • %a - The abbreviated weekday name (Sun)
  • %A - The full weekday name (Sunday)
  • %b - The abbreviated month name (Jan)
  • %B - The full month name (January)
  • %d - Day of the month (01..31)
  • %e - Day of the month without leading 0 (1..31)
  • %g - Year in YY (00-99`)
@coreymartella
coreymartella / CbcRssParser.java
Created May 17, 2016 16:56
Ashby Coding Challenge
/**
*
*/
package com.miovision.rss.reader;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
@coreymartella
coreymartella / to_tree.rb
Created July 16, 2015 15:52
array#to_tree
class Array
def to_tree(*key_methods,&block)
reduce({}) do |tree,e|
key_path = block_given? ? yield(e) : key_methods.map{|m| e.instance_eval(m.to_s)}
sub_tree = tree
key_path.each_with_index do |k,i|
if i == key_path.size - 1
(sub_tree[k] ||= []) << e
elsif
sub_tree = (sub_tree[k] ||= {})
<html>
<HEAD>
<META HTTP-EQUIV="content-type" CONTENT="text/html;charset=UTF-8">
<TITLE>App Store Pricing Matrix</TITLE>
<style type="text/css">
body {
font-family: "Lucida Grande", Arial;
}
table {
.row-fluid
.span10
%h1 PAGE TITLE
#breadcrumbs= breadcrumb
.span2
/"sidebar" content
.row-fluid
/full content that takes the whole page width
@coreymartella
coreymartella / index.html.erb
Created July 31, 2012 15:23
pages_controller.rb
<html>
<head>
<style type="text/css">
table {border: 0; border-collapse: collapse;}
th, td {text-align: left; padding: 2px;}
.odd {background: #eee;}
</style>
</head>
<body>
<table>
@coreymartella
coreymartella / git-commiturl
Created May 2, 2012 18:57
Get a commit url for sharing
#!/usr/bin/env ruby
######
# To Install
# sudo wget https://raw.github.com/gist/2579234/git-commiturl -O /usr/local/bin/git-commiturl
# sudo chmod +x /usr/local/bin/git-commiturl
#
# To use
# git commiturl # gets the HEAD commit hash and copies a github url for it
# git commiturl -c 3dfcb4e7143d0c200e980ee2f65759157e066651 -o #copies a url for a specific commit hash AND opens it in your local browser