Skip to content

Instantly share code, notes, and snippets.

@timwco
timwco / yeoman-githubpages.md
Last active August 16, 2017 17:48
Yeoman & Github Pages

By default Yeoman puts your final work in a folder called dist which by default is ignored by git.

Also, since the site is not powered from the root of your project, Github Pages will show a Page Not Found.

You need to both tell git to NOT ignore the dist folder as well as set up a subtree for your gh-pages branch.

Here are the steps.

Step 1

@timwco
timwco / directions.md
Last active August 16, 2017 17:51
Deploy Yeoman App on Heroku

Deploy a Yeoman Web App on Heroku

Prerequisites - Heroku Toolbelt

1: Navigate to any Yeoman App

2: You'll need Express and Gzippo so run the following

  • npm install gzippo --save
  • npm install express --save
@timwco
timwco / instructions.md
Last active September 29, 2018 00:23
How to use Bourbon, Neat, Bitters and Refills in a Yeoman app with Bower.

Your bower_components folder should be outside of your /app folder. Otherwise you'll need to modify the paths below.

  • Scaffold your Yeoman App
  • Install Bourbon, Neat & Bitters
    • bower install bourbon
    • bower install neat
    • bower install bitters
  • In your app/stylesheets/main.scss include the assets in this order
@import '../../bower_components/bourbon/dist/bourbon';
@timwco
timwco / bookmarklet.js
Created November 20, 2014 03:02
Github Repo to Github Pages Website - JavaScript Regex - Bookmarklet
javascript:(function()%7Bvar s%3Dlocation.href%3Bvar r%3D/%5E((http%5Bs%5D%3F%7Cftp):%5C/)%3F%5C/%3F(%5B%5E:%5C/%5Cs%5D%2B)((%5C/%5Cw%2B)*%5C/)(%5B%5Cw%5C-%5C.%5D%2B%5B%5E%23%3F%5Cs%5D%2B)(.*)%3F(%23%5B%5Cw%5C-%5D%2B)%3F%24/g%3Blocation.href%3Ds.replace(r,"http:/%245.github.io/%246")%3B%7D)()%3B
@timwco
timwco / ghregex.js
Last active December 9, 2016 20:52
Github to GH Pages to Github Bookmarklet
/*
Takes you from a Github Repo URL to the GH Pages version on github.io
*/
javascript: (function() {
var s = location.href;
var r = /^((http[s]?|ftp):\/)?\/?([^:\/\s]+)((\/\w+)*\/)([\w\-\.]+[^#?\s]+)(.*)?(#[\w\-]+)?$/g;
location.href = s.replace(r, "http:/$5.github.io/$6");
})();
// URL Encoded Version (for use as a bookmarklet)
@timwco
timwco / index.html
Last active August 29, 2015 14:21
Calculator Exercise
<!DOCTYPE html>
<html>
<head>
<title>Calculator</title>
<style type="text/css">
.container { width: 300px; margin: 15px auto;}
</style>
</head>
<body>
@timwco
timwco / prework.md
Created May 24, 2015 22:33
Pre Work

Welcome

Below is part of the information that we usually send out a few weeks befor class starts. Let me know if you have any questions.

Your Workstation

Other than your brain, the most important tool you will use is your workstation. Making sure it is properly set up is extremely important. This is the reason we do the install party. Here are some things you'll need to make sure you have.

  • Macbook Air or Pro running the latest OSX
  • Clean up your machine. Those of you who have not started with a new machine, take some time to clean up your desktop and even your file system if possible.
@timwco
timwco / st3.sh
Created October 15, 2015 02:33
Sublime Text 3 - From Command Line
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
@timwco
timwco / topics.md
Last active October 19, 2015 19:43
Review
  • Overall Goals

HTML/CSS

  • CSS Style Resource
  • HTML - benefits of tags (elepsisdfsasdfa)
  • Whitespace in HTML/CSS
  • Proper nesting in SASS/CSS (how far)

Git / Tools