Based on Remy Sharp's most excellent Working the Command Line
brew install zsh zsh-completions
Add oh-my-zsh
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
Make zsh default shell
| #301 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |
| { | |
| "data": [ | |
| { | |
| "id": 14832, | |
| "Title": "First story title", | |
| "Content": "postBody. Long body of markdown or html removed for this example", | |
| "Date": "2017-01-13", | |
| "Permalink": "first-story-title", | |
| "author_given_name": "Scott", | |
| "author_family_name": "Gruber" |
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
Based on Remy Sharp's most excellent Working the Command Line
brew install zsh zsh-completions
Add oh-my-zsh
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
Make zsh default shell
If user is not on home page, then load MailChimp subscribe form.
I have a subscribe to my email newsletter component in the middle of my home page. I also include the subscribe component in the footer of each page. The conditionally test lets me load the subscribe component only when users are not on the home page thereby avoiding the duplication. I'm taking advantage of PerchSystem class which holds a number of utility methods to make it easier to quickly code a solution. I'm posting this note to document my use cases and learning notes PerchSystem.
| // cards-hardboiled.config.js | |
| 'use strict'; | |
| const request = require('request-promise'); // require the request-promise module | |
| // make the request to the API, returns a Promise | |
| const response = request({ | |
| uri: 'https://scottgruber.me/api/hardboiled', | |
| json: true | |
| }); |
| /** Gulp tasks. | |
| 1. lint scss files | |
| 2. compile sass | |
| Development: Linting, Sourcemaps, Autoprefixing, Watch | |
| Production: Linting, Autoprefixing, Optimisation (Sorting, removing duplicates etc.), Minification | |
| // https://github.com/slushie-js/slushie | |
| /** | |
| * Linting Sass stylesheets with Stylelint | |
| * http://www.creativenightly.com/2016/02/How-to-lint-your-css-with-stylelint/ |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>suefan.art Travel Fans</title> | |
| <meta name="description" content="An interactive map of everywhere the Fan family traveled this year."> | |
| <meta name="author" content="Lauren Hallden"> |
| <?php | |
| //include('../perch/runtime.php'); | |
| $site_url = 'https://'.$_SERVER['HTTP_HOST']; | |
| $feed = [ | |
| //'version' => 'https://jsonfeed.org/version/1', | |
| //'title' => 'Scott Gruber\'s website', | |
| //'home_page_url' => $site_url, | |
| //'feed_url' => $site_url.'/blog/json-export.php', |