Skip to content

Instantly share code, notes, and snippets.

View hhff's full-sized avatar
♻️
not ur dad's plant-based solarpunk marxist

Hugh Francis hhff

♻️
not ur dad's plant-based solarpunk marxist
View GitHub Profile
@hhff
hhff / generatorTasks.js
Created February 10, 2019 19:30
webhook2contentful: generatorTasks.js modifications
module.exports = function(grunt) {
/* ...Snip */
/* Paste this at the end of the file */
grunt.registerTask('migrateToContentful', '', function() {
generator.migrateToContentful(this.async(), generator.reloadFiles);
});
};
module.exports.version = curVersion;
@hhff
hhff / generator.js
Last active February 10, 2019 21:13
webhook2contentful: generator.js modifications
module.exports.generator = function (config, options, logger, fileParser) {
/* ...Snip */
/* Paste this right at the end of the file */
let oldGetBucket;
[getBucket, oldGetBucket] =
require(`${__dirname}/contentful/decorators/getBucket`)(getBucket);
let oldGetDnsChild;
[getDnsChild, oldGetDnsChild] =
require(`${__dirname}/contentful/decorators/getDnsChild`)(getDnsChild);
@hhff
hhff / directions.sh
Created September 28, 2018 19:55
SSL Proxy for Multi Tenant Sites on AWS
ssh -i your_key.pem ec2-user@YOUR_EC2_IP
sudo yum-config-manager --add-repo https://openresty.org/package/amazon/openresty.repo
sudo yum install openresty
sudo yum install openresty-resty
# if https://openresty.org/package/amazon/2/x86_64/repodata/repomd.xml: \[Errno 14\] HTTPS Error 404 - Not Found
# sudo vim /etc/yum.repos.d/openresty.repo
# exchange the $releasever placeholder of the baseurl to “latest” baseurl=https://openresty.org/package/amazon/latest/$basearch.
@hhff
hhff / ContainerBase.js
Created July 31, 2018 15:29
React on Ember
import React, { Component } from "react";
import get from "utils/get";
// Use extend ContainerBase in your Route Containers and use
// the provided lifecycle hooks to load data. This way you'll
// have a predictable edge to know when data is loaded for your
// Route - super useful for serverside rendering your app!
class ContainerBase extends Component {
state = {
@hhff
hhff / _spacings.scss
Last active February 1, 2016 19:30
Medium - CSS for the Functional Programmer - Spacings
/*
Loop through different CSS attributes to create a bunch
of standard spacing classes, based on a single unit.
Creates Classes such as:
.padding-none
.margin (all directions)
.padding-left-none
.margin-right-half
.padding-top
@hhff
hhff / _aspect.scss
Created February 1, 2016 16:36
Medium - CSS for the Functional Programmer - Aspect Example
@mixin aspect-ratio($width, $height) {
position: relative;
&:before {
display: block;
content: "";
width: 100%;
padding-top: ($height / $width) * 100%;
}
> .content {
position: absolute;
@hhff
hhff / _colors.scss
Last active February 1, 2016 15:56
Medium - CSS for the Functional Programmer - Color Maps
$colors: (
'light-grey': #f9f9f9,
'mid-grey': #9b9b9b,
'dark-grey': #4d4d4d,
'white': #fff,
'bright-blue': #6ad3ef,
'light-blue': #4c92c3,
'mid-blue': #0b73ac,
'dark-blue': #004a69,
'mid-green': #1bba99,
@hhff
hhff / composable.html
Created January 31, 2016 21:48
Medium - CSS for the Functional Programmer - Composable Example
<nav class='position-fixed full-width nav-height'>
<button class='background-color-mid-green color-white padding'>Login</button>
</nav>
<div class='row nav-padding'>
<div class='small-12 medium-6 large-4 columns'>
<h6 class='color-green vertical-center padding-top-2x'>Single Shoe Club</h6>
</div>
<div class='small-12 medium-6 large-8 columns'>
<h1 class='color-white font-weight-600 uppercase'>Sign up and get a free shoe</h1>
@hhff
hhff / non-composable.html
Last active January 31, 2016 21:47
Medium - CSS for the Functional Programmer - Non-Composable Approach
<nav class='top-bar'>
<button class='login'>Login</button>
</nav>
<div class='content-container'>
<div class='left-content'>
<h6>Single Shoe Club</h6>
</div>
<div class='right-content'>
<h1>Sign up and get a free Shoe</h1>
@hhff
hhff / index.html
Created December 1, 2015 03:01
eames interactive tweak
<!-- Change This: -->
<div id="eames-interactive-story" style="margin-left:-55px" data-asset-path="/content/dam/hermanmiller/microsites/eames-interactive-story/" data-locale-code="en"></div>
<!-- To This: -->
<style>
#eames-interactive-story h2 {
font-size: 20px;
}
</style>