Skip to content

Instantly share code, notes, and snippets.

View jordanrobinson's full-sized avatar
:shipit:
Shippin' it

Jordan Robinson jordanrobinson

:shipit:
Shippin' it
View GitHub Profile
@jordanrobinson
jordanrobinson / game_of_life.clj
Last active October 29, 2019 16:25
Clojure Game of Life
(ns clojure-katas.game-of-life)
(defn contains-live?
[board]
(.contains (apply concat board) 1))
(defn create-grid
[size]
(repeat size (repeat size 0)))
@jordanrobinson
jordanrobinson / CDN.config
Last active April 1, 2019 15:56
CDN.config
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"
xmlns:set="http://www.sitecore.net/xmlconfig/set/"
xmlns:role="http://www.sitecore.net/xmlconfig/role/"
xmlns:env="http://www.sitecore.net/xmlconfig/env/">
<sitecore>
<mediaLibrary>
<mediaProvider>
<patch:attribute name="type">Foundation.Caching.Providers.CDNMediaProvider, Foundation.Sitecore</patch:attribute>
</mediaProvider>
</mediaLibrary>
public static string VersionHash(this HtmlHelper helper)
{
var assembly = typeof(TheCurrentClassYou'reCallingFrom).Assembly;
var attributes = assembly.GetCustomAttributes<AssemblyMetadataAttribute>();
var hash = attributes.FirstOrDefault(a => a.Key == "GitHash")?.Value;
return hash?.Replace("-dirty", string.Empty);
}
@jordanrobinson
jordanrobinson / check-file.clj
Last active March 21, 2018 22:00
Some clj files for the blog post
((if (= updated (read-updated-date user))
(log-output user)
(write-update user schedule))
(defn read-updated-date
"reads in the last updated details from the filesystem for comparison"
[user]
(if (.exists (io/as-file (str user ".clj")))
(let [updated-date (get (read-string (slurp (str user ".clj"))) :updated_at)]
(get (clojure.string/split updated-date #":") 0))))
@jordanrobinson
jordanrobinson / circleci.yml
Created February 20, 2018 23:02
CircleCI blog post with .net core
general:
build_dir: CoolProject.AwesomeNamespace/src/YourSource.Directory
dependencies:
pre:
- sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
- sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
- sudo apt-get update
override:
- sudo apt-get install dotnet-dev-1.0.4
post:
### Keybase proof
I hereby claim:
* I am jordanrobinson on github.
* I am jordanrobinson (https://keybase.io/jordanrobinson) on keybase.
* I have a public key ASAoyn3IkJJgJ_ir7aaAEF56RBJ6n3M9z4lAavfyl85Qqgo
To claim this, I am signing this object:
@jordanrobinson
jordanrobinson / JordanRobinson.TintProcessor.config
Last active January 12, 2018 14:34
Image Processor Blog Post
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<mediaLibrary>
<requestProtection>
<protectedMediaQueryParameters>
<parameter description="tint" name="tint"/>
</protectedMediaQueryParameters>
<customMediaQueryParameters>
<parameter description="tint" name="tint"/>
{
"font_size": 11,
"ignored_packages":
[
"Vintage"
],
"show_encoding": true,
"spell_check": true,
"theme": "Soda Dark 3.sublime-theme",
"update-check": false
@jordanrobinson
jordanrobinson / cmder.xml
Created June 5, 2017 15:41
cmder config
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2017-06-05 16:36:39" build="161206">
<value name="StartType" type="hex" data="02"/>
<value name="CmdLine" type="string" data=""/>
<value name="StartTasksFile" type="string" data="@C:\Apps\cmder\config\tabs.txt"/>
<value name="StartTasksName" type="string" data="{startup}"/>
<value name="StartFarFolders" type="hex" data="00"/>
<value name="StartFarEditors" type="hex" data="00"/>
@jordanrobinson
jordanrobinson / 404.aspx
Last active June 4, 2017 12:45
sitecore-404
<%@ outputcache location="None" varybyparam="none" %>
<%@ page language="c#" enableviewstate="false" autoeventwireup="True" inherits="SitecoreClient.Page.NotFound" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="robots" content="noindex, nofollow" />