Skip to content

Instantly share code, notes, and snippets.

@jdsimcoe
jdsimcoe / base64.md
Created October 16, 2015 23:03
A guide to how to embed Base64 stuff in your web stuff.

HTML

Here is some code on how to embed Base64 in HTML:

JPEG

<img src="data:image/jpeg;base64,BASE64_STRING"/>

PNG

@jdsimcoe
jdsimcoe / respsizes.js
Created October 15, 2015 21:08 — forked from tevko/respsizes.js
Dev Tools Snippet to auto-calculate responsive image sizes value on window resize
/**
*
* Paste image class / identifier in IIFE parenthesis at end of function
*
* */
(function(i){"use strict";var img=document.querySelector(i),sizes=[];window.addEventListener("resize",()=>{var vw=Math.round(((img.offsetWidth*100)/window.innerWidth))+"vw",mq="(min-width: "+window.innerWidth+"px)",value=vw;vw!=="0vw"&&sizes.indexOf(vw)===-1&&(sizes.push(value),console.log(mq,vw))})})("PASTE CLASS OR IDENTIFIER HERE");
@jdsimcoe
jdsimcoe / gulpfile.js
Created October 2, 2015 05:23
My Sketch > SVG > Iconfont solution in Gulp.
var gulp = require("gulp");
var sketch = require('gulp-sketch');
var iconfont = require('gulp-iconfont');
var iconfontCss = require('gulp-iconfont-css');
// Iconfont
var fontName = 'circlecons';
var runTimestamp = Math.round(Date.now()/1000);
gulp.task('icons', function(){
@jdsimcoe
jdsimcoe / gulpfile.js
Last active September 25, 2015 15:28
Framer Server
var gulp = require('gulp');
var EXPRESS_PORT = 4000;
var EXPRESS_ROOT = __dirname;
var LIVERELOAD_PORT = 35729;
function startExpress() {
var express = require('express');
var app = express();
app.use(require('connect-livereload')());
app.use(express.static(EXPRESS_ROOT));
@jdsimcoe
jdsimcoe / method-1.html
Created July 22, 2015 23:58
Statamic Open Graph solution.
{{ var:description }}
{{ if description }}{{ description }}
{{ else }}
{{ truncate:words limit="66" }}
{{ if blog__content }}{{ blog__content|striptags }}
{{ elseif profile__bio }}{{ profile__bio|striptags }}
{{ elseif session__type }}{{ content|striptags }}
{{ /if }}
{{ /truncate:words }}
{{ /if }}
@jdsimcoe
jdsimcoe / 01-life-after-eden.md
Last active August 29, 2015 14:24
Notes on the Book WITH by Skye Jethani

Life After Eden

galla-placidia A sample of the sublime mosaic of the Galla Placidia.

The Shadows

We live most of our life in the "shadows" blind to the fullness of the Christian life, like the visitors to the mausoleum of Galla Placidia whose darkened view is punctuated briefly by the illumination of a visitor dropping a coin in a box.

"Each time the lights come on, the visitors are given another glimpse of the world behind the shadows..." —Page 2; Paragraph 2

@jdsimcoe
jdsimcoe / humans.txt
Created June 18, 2015 18:13
A really cool example humans.txt from Google Ventures.
_____) __ __)
/ /) (, ) /
/ ___ _______ // _ | / _ __ _/_ __ _ _
/ / ) (_)(_)(_/_(/__(/_ |/ _(/_/ (_(__(_(_/ (__(/_/_)_
(____ / .-/ |
(_/ Hand-crafted since 2009
'userSessionDuration' => 'P1Y',
'rememberedUserSessionDuration' => 'P1Y',
'rememberUsernameDuration' => 'P1Y',
'invalidLoginWindowDuration' => 'P1Y’,
@jdsimcoe
jdsimcoe / OopsieThings.applescript
Created February 20, 2015 16:47
A script to launch the Things Quick Entry Panel when the app is closed.
set GTDAppName to "Things" global GTDAppName set GTDAppToUse to FindRunningGTDApp() if (GTDAppToUse is null) then set GTDAppToUse to "Things" end if on AppIsRunning(GTDAppName) tell application "System Events" return (count of (application processes whose name is GTDAppName)) is not 0 end tell end AppIsRunning on FindRunningGTDApp() if AppIsRunning(GTDAppName) then null else tell application "Things" activate show quick entry panel end tell end if return null end FindRunningGTDApp