Skip to content

Instantly share code, notes, and snippets.

View astraloverflow's full-sized avatar

Samuel Champagne astraloverflow

View GitHub Profile
@astraloverflow
astraloverflow / gh-pages-deploy.md
Created May 6, 2016 18:51 — 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).

@astraloverflow
astraloverflow / _button.scss
Created May 26, 2016 07:09
For Personal Reference
&__this {
padding: 1em;
background-color: #ddd;
}
@astraloverflow
astraloverflow / LICENSE
Created February 28, 2017 05:24
CC0 1.0 Universal
CC0 1.0 Universal
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator and
subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for the
/* TEAM */
name: Your Name
role: Your Title
contact: Your Email, Website, or Twitter Username
location: City, Country
/* CONTRIBUTORS */
name: Contributor's Name

Keybase proof

I hereby claim:

  • I am astraloverflow on github.
  • I am samuelchampagne (https://keybase.io/samuelchampagne) on keybase.
  • I have a public key whose fingerprint is F81D 602F EA5B 7FD4 AE89 78FA D556 03F4 F961 5A4F

To claim this, I am signing this object:

@astraloverflow
astraloverflow / getUnixTime.js
Created December 15, 2018 01:10
One-liner function to get current Unix time (seconds since 1970-01-01 0:00 UTC)
const getUnixTime = () => ~~(Date.now() / 1000)
@astraloverflow
astraloverflow / _display.scss
Created February 1, 2019 20:09
Responsive display classes for Bootstrap
// Needs Bootstrap Variables, Functions, & Mixins
// @import "../../node_modules/bootstrap/scss/functions";
// @import "../../node_modules/bootstrap/scss/variables";
// @import "../../node_modules/bootstrap/scss/mixins";
@mixin display-1 {
font-size: $display1-size;
font-weight: $display1-weight;
line-height: $display-line-height;
}
/*! https://codeburst.io/alternative-to-javascripts-switch-statement-with-a-functional-twist-3f572787ba1c */
const match = x => {
const matched = y => ({
on: () => matched(y),
otherwise: () => y
})
return ({
on: (pred, fn) => (pred(x) ? matched(fn(x)) : match(x)),
otherwise: fn => fn(x)