Skip to content

Instantly share code, notes, and snippets.

View nathanhornby's full-sized avatar

Nathan Hornby nathanhornby

View GitHub Profile
@nathanhornby
nathanhornby / main.styl
Last active October 13, 2016 13:54
Full main.styl
// Includes
@import 'jeet'
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,700italic,400italic')
// Base
@import '_000-reset'
@import '_001-colors'
@import '_002-typography'
@import '_003-global'
@nathanhornby
nathanhornby / main.styl
Created January 16, 2016 11:19
Import stylus
// Includes
@import 'jeet'
@nathanhornby
nathanhornby / brunch-config.js
Last active March 31, 2018 10:50
Adding Jeet to Brunch - After
// Configure your plugins
plugins: {
stylus: {
plugins: ['jeet']
},
babel: {
// Do not use ES6 compiler in vendor code
ignore: [/vendor/]
}
},
@nathanhornby
nathanhornby / brunch-config.js
Last active March 31, 2018 10:49
Adding Jeet to Brunch - Before
// Configure your plugins
plugins: {
babel: {
// Do not use ES6 compiler in vendor code
ignore: [/vendor/]
}
},
@nathanhornby
nathanhornby / scroll2.js
Created December 16, 2015 00:21
Velocity.js jQuery smooth scroll to #id
/* Scroll2
=======================
Takes one argument, `speed`. Defaults to 500.
Examples:
$('.scroll2').scroll2(); // <a href="#contact" class="scroll2">Contact me</a>
$('#scrollToTop').scroll2(700); // <a href="#header" id="scrollToTop">Scroll to top</a>
@nathanhornby
nathanhornby / alchemist.tmTheme
Created December 12, 2015 23:44
A Sublime Text theme specifically optimised for Elixir. Work in progress.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Alchemist</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@nathanhornby
nathanhornby / typeform-velocity.js
Created December 4, 2015 11:37
Scroll to active field in form (typeform style animation) using velocity.js
// Insert into some kind of 'focus' action
var parent = $(this).parent().parent('.fieldWrap'); // Target a wrapper
// Reset active state
$('.fieldWrap').removeClass('active');
// Add active state to current field
parent.addClass('active');
@nathanhornby
nathanhornby / magnific-velocity.js
Last active June 20, 2016 22:36
Magnific popup with velocity.js animation boilerplate
$.magnificPopup.open({
items: {
src: '#popup',
type: 'inline'
},
removalDelay: 400,
callbacks: {
open: function () {
this.content.velocity('transition.slideDownIn', {
duration: 400
@nathanhornby
nathanhornby / master.html
Last active February 7, 2017 11:57
HTML5 Master
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#222222" />
<!-- Meta -->
<title>Title</title>
@nathanhornby
nathanhornby / Preferences.sublime-settings.JSON
Last active August 30, 2018 16:08
My Sublime Text 3 user preferences
{
"bold_folder_labels": true,
"caret_style": "wide",
"color_scheme": "Packages/Alchemist/Alchemist.tmTheme",
"draw_white_space": "selection",
"enable_tab_scrolling": false,
"ensure_newline_at_eof_on_save": true,
"font_face": "DejaVu Sans Mono",
"font_size": 12.5,
"highlight_line": true,