Skip to content

Instantly share code, notes, and snippets.

Vim

Finding Your Way Around

Download MacVim (optional)

MacVim

Set up Oh-my-zsh (optional)

Unit Tests in Vue.js

Tooling

{
  "karma-mocha": "^0.2.1",
  "karma-chai": "^0.1.0",
  "karma-chai-as-promised": "^0.1.2",
  "karma-sinon": "^1.0.4",

Build "Project Flyer" With Me

purchasing the domain

app scenario

  • As a home owner
  • when i provide address, price, subscription
  • and i can drag and drop about 20 photos
  • then a landing page will get created when i save it.

domain service

  • hover.com

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. Here's how to do it:

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 (or skip and force-add afterwards).

@roberthamel
roberthamel / how-to-launch-any-app-with-a-keyboard-shortcut.md
Last active January 4, 2017 19:07
Launch any Mac app with a keyboard shortcut

How to launch any app with a keyboard shortcut

Automator Service

  1. launch automator
  2. file -> new
  3. click on services then click the choose button

No input, any application

@roberthamel
roberthamel / Form.js
Created May 6, 2017 01:54
Object oriented forms
class Errors {
/**
* Create a new Errors instance.
*/
constructor() {
this.errors = {};
}
/**
@roberthamel
roberthamel / gh-pages-deploy.md
Created May 10, 2017 17:45 — 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).

@roberthamel
roberthamel / .env.travis
Created May 10, 2017 22:12 — forked from gilbitron/.env.travis
Laravel 5 Travis CI config
APP_ENV=testing
APP_KEY=SomeRandomString
DB_CONNECTION=testing
DB_TEST_USERNAME=root
DB_TEST_PASSWORD=
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync
@roberthamel
roberthamel / .htaccess
Created May 11, 2017 21:20 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#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/