Skip to content

Instantly share code, notes, and snippets.

View asmithdigital's full-sized avatar

Andrew asmithdigital

View GitHub Profile
@asmithdigital
asmithdigital / 0_reuse_code.js
Last active August 29, 2015 14:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<div class="moon">
I see a bad moon rising
I see trouble on the way
</div>
<div class="ground">
I see earthquakes and lightnin’
I see bad times today
</div>
@asmithdigital
asmithdigital / my.css
Last active August 29, 2015 14:12 — forked from anonymous/my.css
background: linear-gradient(270deg, #243166, #243166);
background-size: 400% 400%;
-webkit-animation: AnimationName 30s ease infinite;
-moz-animation: AnimationName 30s ease infinite;
-o-animation: AnimationName 30s ease infinite;
animation: AnimationName 30s ease infinite;
@-webkit-keyframes AnimationName {
    0%{background-position:0% 50%}
    50%{background-position:100% 50%}
    100%{background-position:0% 50%}
@asmithdigital
asmithdigital / IE browser warning BS3
Last active August 29, 2015 14:27 — forked from redfrost/IE browser warning BS3
IE browser warning (Bootstrap 3)
<!--[if lt IE 9]><div class="ie-warning alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</div><![endif]-->
// scss-lint:disable Comment
@import 'retina';
/**
* Mixin for retina backgrounds where you can't use a sprite.
*
* - Make sure you have a file@2x.png file additional to your file.png.
* - The mixin prepends $imgPath, which should be set globally at some point. Default is: 'img/'
*
import React from "react";
import { render } from "react-dom";
const ParentComponent = React.createClass({
getDefaultProps: function() {
console.log("ParentComponent - getDefaultProps");
},
getInitialState: function() {
console.log("ParentComponent - getInitialState");
return { text: "" };
@asmithdigital
asmithdigital / gh-pages-deploy.md
Created June 28, 2018 00:47 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).