Skip to content

Instantly share code, notes, and snippets.

View keccers's full-sized avatar

Katherine Champagne keccers

View GitHub Profile
@keccers
keccers / postcalendar.js
Created July 29, 2019 21:43
Google Calendar x Google Sheets AppScript Plugin
function updateEvents() {
// Get Sheet and Calendar
var spreadsheet = SpreadsheetApp.getActiveSheet();
var postCal = CalendarApp.getCalendarById('talentinc.com_hq7sgaqvp5kjgu7a865n4j91tc@group.calendar.google.com');
// Get data from Sheet
var data = spreadsheet.getDataRange().getValues()
var posts = []
@keccers
keccers / Links
Created July 2, 2014 00:04
TIM X KCHAMP PAIRING
@keccers
keccers / less-loop.less
Last active November 15, 2016 20:09
LESS LOOP
.generate-nav(@n, @i: 1) when (@i =< @n) {
@percent: (@i*-100);
input[type=radio]#slide@{i}:checked ~ .slides {
margin-left: 0;
//.another-rule { needs-to-be: nested-in-here; }
}
.generate-nav(@n, (@i + 1));
}
.generate-nav(10);
@keccers
keccers / Queries.sql
Last active August 29, 2015 13:56
Tribe Events Global Nav SQL
/*Gets all posts with type 'Tribe Events'*/
SELECT posts.*
FROM wp_posts AS posts
JOIN wp_postmeta AS pm1
ON (posts.ID = pm1.post_id AND pm1.meta_key = '_EventStartDate')
JOIN wp_term_relationships AS term_relationships
ON posts.ID = term_relationships.object_id
INNER JOIN wp_term_taxonomy AS term_taxonomy
ON term_relationships.term_taxonomy_id = term_taxonomy.term_taxonomy_id
JOIN wp_terms AS terms
@keccers
keccers / donate.html
Created January 31, 2014 15:52
Donation Form
<html id="HTML" xmlns="http://www.w3.org/1999/xhtml" lang="en-us"><head id="PageHead"><title>
Breast Cancer Donations | Donate to BCRF - The Breast Cancer Research Foundation
</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"><link rel="stylesheet" href="/stylesheet0.635124079126100000.css?id=0&amp;iuqt=1" type="text/css">
<link rel="stylesheet" href="/stylesheet48.635161518576330000.css?id=48&amp;nodefaults=1&amp;iuqt=1" type="text/css">
<link rel="stylesheet" href="/stylesheet37.634571552590370000.css?id=37&amp;nodefaults=1&amp;iuqt=1" type="text/css">
<link rel="stylesheet" href="/stylesheet46.634571562615230000.css?id=46&amp;nodefaults=1&amp;iuqt=1" type="text/css">
<link rel="stylesheet" href="/Client/Styles/IE8Menu.css?&amp;iuqt=1" type="text/css">
<link rel="stylesheet" href="/client/styles/jquery/smoothness/jquery-ui-1.7.1.all.css?&amp;iuqt=1" type="text/css">
<base id="baseId" target="_self">
@keccers
keccers / newsletter-menu.html
Last active January 4, 2016 04:39
Newsletter Menu
<!-- this replaces the header menu code. changes are commented! -->
<tbody>
<tr style="margin:0;padding:0;font-family:&quot;Helvetica Neue&quot;,&quot;Helvetica&quot;,Helvetica,Arial,sans-serif">
<!-- logo section -->
<td style="margin:0;padding:0;font-family:&quot;Helvetica Neue&quot;,&quot;Helvetica&quot;,Helvetica,Arial,sans-serif">
<a href="http://www.isaora.com/?utm_source=newsletter&amp;utm_medium=email&amp;utm_campaign=quiksilver" style="margin:0;padding:0;font-family:&quot;Helvetica Neue&quot;,&quot;Helvetica&quot;,Helvetica,Arial,sans-serif;color:#376b90;text-decoration:none" target="_blank">
<img src="https://ci3.googleusercontent.com/proxy/QhOhFRaLyMjRWoGsM_NVoiSqU-I7P7y1leOzs6YRoDeIzTY_wJF00WlW1QmyKP8SBogex_RussgFdeasrt8U9gzaT4gk52BjHJe9Xdz4f9_LLZ0PlITLo0NzjEua_g=s0-d-e1-ft#http://gallery.mailchimp.com/7ff084ba946afdfaacf33b678/images/logo.2.png" style="margin:0;padding:0;font-family:&quot;Helvetica Neue&quot;,&quot;Helvetica&quot;,Helvetica,Arial,sans-serif;max-width:100%">
@keccers
keccers / gist:8302404
Created January 7, 2014 16:55
Tribe Events Map Code
<div id="tribe-events-gmap" style="height: 350px; width: 100%; margin-bottom: 15px;"></div><!-- #tribe-events-gmap -->
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script><script src="http://maps.gstatic.com/intl/en_us/mapfiles/api-3/15/5/main.js" type="text/javascript"></script>
<script type="text/javascript">
var event_address;
function initialize() {
var myOptions = {
zoom: 15,
center: event_address,
mapTypeId: google.maps.MapTypeId.ROADMAP
@keccers
keccers / tribe_events.sql
Created December 17, 2013 17:57
Horror Query
SELECT DISTINCT wp_posts.ID, wp_postmeta.meta_value as EventStartDate, IF(tribe_event_duration.meta_value IS NULL, tribe_event_end_date.meta_value, DATE_ADD(CAST(wp_postmeta.meta_value AS DATETIME), INTERVAL tribe_event_duration.meta_value SECOND)) as EventEndDate, tribe_event_duration.meta_value as EventDuration FROM wp_posts INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) AND wp_postmeta.meta_key = '_EventStartDate' LEFT JOIN wp_postmeta as tribe_event_end_date ON ( wp_posts.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = '_EventEndDate' ) LEFT JOIN wp_postmeta as tribe_event_duration ON ( wp_posts.ID = tribe_event_duration.post_id AND tribe_event_duration.meta_key = '_EventDuration' ) WHERE 1=1 AND wp_posts.post_type = 'tribe_events' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') AND (wp_postmeta.meta_key = '_EventStartDate' ) AND ((wp_postmeta.meta_value >= '2013-12-01' AND wp_postmeta.meta_value <= '2013-12-31') OR (IF(tribe_event_duration.m
@keccers
keccers / Sample.rb
Created December 13, 2013 21:39
DOL Ruby SDK example
#import the GOVDataSDK file into your sample project.
require './GOVDataSDK'
#Create a new object and call the extend data set.
API_HOST = 'http://api.dol.gov'
API_KEY = 'c789a707-76b6-470e-8e94-a9bfb9d9a7d6'
API_SECRET = 'bosses_office'
API_URI = 'V1'
API_DATA = 'article/xml'