Skip to content

Instantly share code, notes, and snippets.

View jimmyhillis's full-sized avatar

Jimmy Hillis jimmyhillis

View GitHub Profile
@jimmyhillis
jimmyhillis / complex-special-situation.scss
Last active August 29, 2015 14:27
Showing intent with mixin overrides
.special-situation {
@include subtitle;
@include gutters;
display:inline-block;
max-width:50%;
margin-bottom:2em;
color:$blue;
}
@jimmyhillis
jimmyhillis / UIFont+CustomFont.swift
Created December 15, 2014 13:28
UIFont+CustomFont.swift
import UIKit
extension UIFont {
class func systemFontOfSize(size: CGFloat) -> UIFont {
return UIFont(name: "CustomFont-Regular", size: size)!
}
func lightSystemFontOfSize(size: CGFloat) -> UIFont {
return UIFont(name: "CustomFont-Light", size: size)!
}
func boldSystemFontOfSize(size: CGFloat) -> UIFont {
// Break a name into two
let nameParts = split(json["_name"].stringValue) { $0 == " " }
let firstName = nameParts.first
let lastName = nameParts.count > 1 ? join(" ", nameParts[1...nameParts.count-1]) : ""
@jimmyhillis
jimmyhillis / Vagrantfile
Created July 23, 2014 08:35
Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "windows-server-2012R2-peet"
# config.vm.guest = :windows
config.vm.communicator = "winrm"
config.vm.network "private_network", ip: "192.168.50.4"
config.vm.network :forwarded_port, host: 8080, guest: 80
config.vm.network :forwarded_port, guest: 3389, host: 3391
config.vm.network :forwarded_port, guest: 5985, host: 5987
config.vm.synced_folder ".", "C:/sites/default/peet-cms",
type: "rsync", rsync__exclude: ".git/"
@jimmyhillis
jimmyhillis / test.html
Created July 22, 2014 06:28
Example JS for Peet
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
var communities_url = "http://www.peet.com.au/ClientAsyncSvc.axd?q=getCommunities&sid=1&rids=0&getAll=true&gbr=1&seed=1405924115719";
var Community = function (data) {
this = $.defaults(this, data);
this._available_lots = null;
};
Community.prototype.availableLots = function () {
@jimmyhillis
jimmyhillis / shareurls.php
Created April 29, 2014 06:06
Share URL strings from variables
<?php
$tweet_url = 'http://twitter.com/intent/tweet'
. '?text=' . urlencode($PAGE_TITLE)
. '&url=' . urlencode($PAGE_URL)
. '&via=' . $TWITTER_UN;
$facebook_url = 'https://www.facebook.com/dialog/feed'
. '?app_id=' . urlencode(FACEBOOK_APP_ID)
. '&link=' . urlencode($PAGE_URL)
. '&name=' . urlencode($PAGE_TITLE)
@jimmyhillis
jimmyhillis / shareurls.php
Created April 29, 2014 06:06
Share URL strings from variables
<?php
$tweet_url = 'http://twitter.com/intent/tweet'
. '?text=' . urlencode($PAGE_TITLE)
. '&url=' . urlencode($PAGE_URL)
. '&via=' . $TWITTER_UN;
$facebook_url = 'https://www.facebook.com/dialog/feed'
. '?app_id=' . urlencode(FACEBOOK_APP_ID)
. '&link=' . urlencode($PAGE_URL)
. '&name=' . urlencode($PAGE_TITLE)
@jimmyhillis
jimmyhillis / shareurls.php
Created April 29, 2014 06:06
Share URL strings from variables
<?php
$tweet_url = 'http://twitter.com/intent/tweet'
. '?text=' . urlencode($PAGE_TITLE)
. '&url=' . urlencode($PAGE_URL)
. '&via=' . $TWITTER_UN;
$facebook_url = 'https://www.facebook.com/dialog/feed'
. '?app_id=' . urlencode(FACEBOOK_APP_ID)
. '&link=' . urlencode($PAGE_URL)
. '&name=' . urlencode($PAGE_TITLE)
@jimmyhillis
jimmyhillis / shareurls.php
Created April 29, 2014 06:06
Share URL strings from variables
<?php
$tweet_url = 'http://twitter.com/intent/tweet'
. '?text=' . urlencode($PAGE_TITLE)
. '&url=' . urlencode($PAGE_URL)
. '&via=' . $TWITTER_UN;
$facebook_url = 'https://www.facebook.com/dialog/feed'
. '?app_id=' . urlencode(FACEBOOK_APP_ID)
. '&link=' . urlencode($PAGE_URL)
. '&name=' . urlencode($PAGE_TITLE)
@jimmyhillis
jimmyhillis / shareurls.php
Created April 29, 2014 06:06
Share URL strings from variables
<?php
$tweet_url = 'http://twitter.com/intent/tweet'
. '?text=' . urlencode($PAGE_TITLE)
. '&url=' . urlencode($PAGE_URL)
. '&via=' . $TWITTER_UN;
$facebook_url = 'https://www.facebook.com/dialog/feed'
. '?app_id=' . urlencode(FACEBOOK_APP_ID)
. '&link=' . urlencode($PAGE_URL)
. '&name=' . urlencode($PAGE_TITLE)