Skip to content

Instantly share code, notes, and snippets.

View dmolsen's full-sized avatar

Dave Olsen dmolsen

View GitHub Profile
@dmolsen
dmolsen / instagram code generator
Created April 5, 2013 16:25
The URL to generate the code that lets one generate an Instagram access token.
https://api.instagram.com/oauth/authorize/?client_id=[clientID]&redirect_uri=[redirectURI]&response_type=code
curl -F 'client_id=[clientID]' -F 'client_secret=[clientSecret]' -F 'grant_type=authorization_code' -F 'redirect_uri=[redirectURI]' -F 'code=[code]' https://api.instagram.com/oauth/access_token
@dmolsen
dmolsen / Facebook + Twitter Fan Count
Created September 27, 2010 15:47
Pulls the Facebook fan count and Twitter follower count for the specified accounts.
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
var f_page = "wvumountaineers"; // the page name for your fan page, e.g. the 'wvumountaineers' part of http://facebook.com/wvumountaineers
var t_page = "westvirginiau"; // the account name for your main twitter account
function add_commas(number) {
if (number.length > 3) {
var mod = number.length % 3;
@dmolsen
dmolsen / bubble-range.js
Created July 9, 2012 13:50
jQuery-less version of Chris Coyier's Value Bubbles for Range Inputs
/**********************************************************
* jQuery-less version of Chris Coyier's
* Value Bubbles for Range Inputs
* http://css-tricks.com/value-bubbles-for-range-inputs/
**********************************************************/
function modifyOffset() {
var el, newPoint, newPlace, offset, siblings, k;
width = this.offsetWidth;
newPoint = (this.value - this.getAttribute("min")) / (this.getAttribute("max") - this.getAttribute("min"));
This is how I make my Cajun wings.
## Kit
- Gallon sized plastic bag (used to coat wings and marinate)
- Baking sheet
- Extra baking rack
- Aluminum foil
- Tongs
@dmolsen
dmolsen / FAFSAREMINDER.json
Created November 15, 2018 14:43
This file describes our FAFSA Reminder email sent to: prospects/inquiries (.* or 100|200), applicants (300), admits (400) and parents of admits. Segmentation is done by providing key for segment with its associated content. Most of the JSON describes what content to add to a pattern and how to modify it.
{
"layout": {
"FR_300_1908~": "morgantown/admissions-gold-zeroed",
"FR_400_1908~": "morgantown/admissions-gold-zeroed-with-actions-admitted",
"FR_(.*)_1908~": "morgantown/admissions-gold-zeroed-with-actions",
"XP_FR_~": "morgantown/admissions-gold-zeroed"
},
"client": "morgantown/admissions",
"emailName": "[SEGMENT]_FAFSAREMINDER_SEP18",
"content": {
@dmolsen
dmolsen / modifyPanels.js
Created July 7, 2016 01:16
This should be added to the end of `index.html` below the `Dispatcher` set-up.
<script>
function modifyPanels() {
var panelsNew;
panelsNew = Panels.panels.splice(1,1);
panelsNew[0].default = true;
Panels.panels = panelsNew;
}
Dispatcher.addListener("setupPanels", modifyPanels);
</script>
@dmolsen
dmolsen / PL v0.7.0 patternPaths
Created January 9, 2014 15:41
The patternPaths array from v0.7.0 of Pattern Lab
Array
(
[atoms] => Array
(
[head] => Array
(
[patternSrcPath] => 00-atoms/00-meta/_00-head
[patternDestPath] => 00-atoms-00-meta-_00-head
[patternPartial] => atoms-head
[render] =>
@dmolsen
dmolsen / PL v0.7.0 navItems
Created January 9, 2014 15:32
This is the organization and naming scheme for $this->navItems in v0.7.0 of Pattern Lab
Array
(
[patternTypes] => Array
(
[0] => Array
(
[patternTypeLC] => atoms
[patternTypeUC] => Atoms
[patternType] => 00-atoms
[patternTypeDash] => atoms
@dmolsen
dmolsen / gist:7489066
Created November 15, 2013 18:16
Loading jQuery
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="styleguide/js/jquery.js"><\/script>')</script>