Skip to content

Instantly share code, notes, and snippets.

View benweiser's full-sized avatar

Ben Weiser benweiser

View GitHub Profile
@benweiser
benweiser / Hyper settings
Created June 6, 2019 16:23
Hyper settings
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
// default font size in pixels for all tabs
fontSize: 12,
@benweiser
benweiser / Landing.js
Created May 14, 2019 19:18
Props for landing js
{
"history": {
"length": 2,
"action": "POP",
"location": {
"pathname": "/booking",
"search": "",
"hash": "",
"key": "tlzb8i"
}
.top-bar {
background-color: #000;
min-height: 60px;
position: fixed;
transition: top 0.2s ease-in-out;
text-align: center;
width: 100%;
z-index: 99;
-webkit-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.2);
<div id="mobile-body">
<hr>
<section>
<h2>FEATURES</h2>
<ul class="mobile-features">
<li>
<img src="/content/dam/Mobile/mobilefreeplay/DGTL1214_CET_MobileDownloadableCredits_Landingpage_clock.png" alt=""/>
<p>Manage your Free Play Bank and downloadable offers 24/7 with your mobile device as you move from game to game</p>
</li>
<li>
@benweiser
benweiser / gist:7d23e418a93b9097aa7d34d05f3ee92a
Last active July 5, 2016 16:49
Code for child page to post scrollHeight data to parent window
!function(){window.onload=function(){function n(){window.parent.postMessage(document.documentElement.scrollHeight,"*")}var o=function(t,i){setTimeout(function(){n(),i&&o(t+100,--i)},t)};window.onload=o(500,10),window.onresize=function(){n()},window.addEventListener?window.addEventListener("click",n,!1):window.attachEvent("onclick",n)}}();
{
"name": "PROJECT NAME HERE",
"version": "0.0.1",
"description": "Github project link: URL HERE",
"main": "gruntfile.js",
"dependencies": {
"grunt": "^0.4.5",
"grunt-contrib-sass": "^0.9.2",
"grunt-browser-sync": "^2.1.3",
"grunt-contrib-watch": "^0.6.1"
module.exports = function(grunt) {
grunt.initConfig({
// Watch task config
pkg: grunt.file.readJSON('package.json'),
watch: {
sass: {
// files: "*.scss",
files: '**/*.scss',
tasks: ['sass', 'autoprefixer' ]
},
@benweiser
benweiser / gist:f1e5d8c443444bd485f1
Created January 23, 2016 18:24
Simulate hover events on mobile
document.body.addEventListener('touchstart',function(){},false);
.top-bar {
background-color: #fff;
min-height: 40px;
padding: 10px;
padding: 1rem;
position: fixed;
transition: top 0.2s ease-in-out;
-webkit-transition: top 0.2s ease-in-out;
-moz-transition: top 0.2s ease-in-out;
text-align: center;
@benweiser
benweiser / Add A Genesis Featured Image Above Post With Title - Style.css
Created October 26, 2015 03:41
Add A Genesis Featured Image Above Post With Title - Style.css
.bw-featured-title {
background-size:cover;
background-repeat:no-repeat;
text-align:center;
width:100%;
}
.bw-featured-title .entry-header {
position: relative;