Skip to content

Instantly share code, notes, and snippets.

View ricklancee's full-sized avatar
💭
Edit status

Rick Lancee ricklancee

💭
Edit status
View GitHub Profile
@ricklancee
ricklancee / custom.zsh-theme
Last active May 21, 2016 12:21
Custom oh my zsh theme based on suvash
function prompt_char {
echo '$'
}
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
}
function collapse_pwd {
echo $(pwd | sed -e "s,^$HOME,~,")

Automate release workflow

If your project follows a semantic versioning, it may be a good idea to automatize the steps needed to do a release. Below you have a simple recipe that bumps the project version, commits the changes to git and creates a new tag.

var gulp = require('gulp');
var runSequence = require('run-sequence');
var conventionalChangelog = require('gulp-conventional-changelog');
@paulirish
paulirish / bling.js
Last active July 23, 2024 01:12
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
};
NodeList.prototype.__proto__ = Array.prototype;
/**
* Get requestAutocomplete data. Can only be called as part of an interaction event
* listener such as mouse up/down, click, key & touch.
*
* @param {{billing: boolean, shipping: boolean}} opts
* If billing is true, credit card & billing address details will be requested.
* If shipping is true, a shipping name & address will be requested.
* @param {function(response:Object<string, string>)} callback [description]
* You callback is passed a single response object in this format:
* {
@cobyism
cobyism / gh-pages-deploy.md
Last active July 18, 2024 05:22
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).