Skip to content

Instantly share code, notes, and snippets.

View dotspencer's full-sized avatar

Spencer Smith dotspencer

View GitHub Profile
@dotspencer
dotspencer / shortcode.php
Last active September 28, 2016 23:06
EGI project status shortcode
$url = "https://egi.utah.edu/api/research.json";
$json = file_get_contents($url);
$data = json_decode($json);
$path = parse_url(get_permalink(), PHP_URL_PATH);
$num = strtoupper(end(array_filter(explode('/', $path))));
if(strlen($num) < 3){ # I numbers should always be at least 3 digits long
echo "I# not found in URL";
}
@dotspencer
dotspencer / playlist.json
Last active June 21, 2016 18:38
Demo playlist json file
{
"Josef Salvat - Open Season": "WOkdkSIgu3Q",
"Cold War Kids - First": "zE23hMLbHg4",
"Lighthouse - Patrick Watson": "UkT43qmMZhY",
"AURORA - Runaway": "cZKubYgl7JM",
"BØRNS - 10,000 Emerald Pools": "L4GrDOOIIbk",
"The Lumineers - Ophelia": "pTOC_q0NLTk",
"BØRNS - The Emotion": "z_CfRxf3kPI"
}
@dotspencer
dotspencer / ca-export-pdf.jsx
Last active February 22, 2017 21:02
EGI -- InDesign export script for generating CA list pdfs
/*
* Export script for generating CA list pdfs
* Author: Spencer Smith,
* Created: 06/22/2016
*/
var ca = {
name: "EGI_Corporate_Associate_Members.pdf",
label: "CA List",
range: "2",
checkbox: null
@dotspencer
dotspencer / EGI High Quality.joboptions
Created June 22, 2016 22:26
EGI High Quality PDF export presets
<<
/ASCII85EncodePages false
/AllowPSXObjects false
/AllowTransparency false
/AlwaysEmbed [
true
]
/AntiAliasColorImages false
/AntiAliasGrayImages false
/AntiAliasMonoImages false
{
"I01168" : {
"id" : "I01168",
"body" : "Project Rationale & Significance:\nEGI has world-class expertise on organic and inorganic geochemistry of fluids, rocks and minerals. We are applying our craft to develop new integrative tools to improve discovery and production of oil and gas from conventional and unconventional resources. These efforts compliment EGI projects dealing with shale gas characterization, basin modeling, iCORDS™, and tracer testing.\nAreas of New Research\nTrace metals in carbon-rich source rocks in terrestrial and marine sedimentary rock – This study involves geochemical characterization of trace metals in source rocks. One task will test the existence of geochemical zonation haloes around concentrations of gas and oil in unconventional reservoirs. A second task will test the potential of distinguishing global from local anoxia events in marine sediments.\nFormation water chemistry: fluid-rock interactions and fluid flow histories related to basin evolution, reservoir filli
@dotspencer
dotspencer / Description.plist
Last active July 7, 2016 21:34
Custom Mac Mail Stationery
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Display Name</key>
<string>Staff Info Request</string>
<key>Folder Name</key>
<string>Staff Info Request.mailstationery</string>
<key>HTML File</key>
<string>content.html</string>
@dotspencer
dotspencer / steps.md
Last active December 31, 2016 06:45
Steps for Local Wordpress Installation
@dotspencer
dotspencer / steps.md
Created July 12, 2016 21:10
Make Finder sidebar server alias links stay and include server icon
  1. Connect to Server
  2. Go to Volumes in Finder
  3. Drag server connection to sidebar
  4. Make alias to server on Desktop by dragging and holding cmd + opt
  5. Drag alias into Finder sidebar into a location other than where the actual server link is.

Now your link will stay even when disconnected and will have the server icon

@dotspencer
dotspencer / code.php
Last active July 22, 2016 19:30
EGI -- A to Z Staff List
?>
<style>
.aList ul li {
display: inline-flex;
margin: 0;
color: darkgray;
padding: 5px;
}
.aList ul {
@dotspencer
dotspencer / style.css
Last active November 14, 2016 23:34
EGI Website Custom CSS
p{color:#555;}
/* Margin below page breadcrumb */
.page-callout + .content-container {
//padding-top: 15px;
}
.content-container {
border-top: 30px solid white;
}
.content-container h1:first-of-type {