Skip to content

Instantly share code, notes, and snippets.

View hellobrian's full-sized avatar
🏠
Working from home

Brian Han hellobrian

🏠
Working from home
View GitHub Profile
@hellobrian
hellobrian / example.js
Last active May 23, 2016 05:14
npm lifecycle event
const TARGET = process.env.npm_lifecycle_event;
if (TARGET === ‘build’) {
console.log(`Running your build tasks!`);
}
if (TARGET === ‘dev’) {
console.log(`Running the dev server!`);
}
@hellobrian
hellobrian / Dropdown.markdown
Last active May 6, 2016 03:18
Dropdown (actual)

Dropdown

This dropdown can open and close on click events. When clicking on the dropdown, it will toggle the open class When clicking outside of the dropdown, it will remove the open class, effectively closing the dropdown

A Pen by Brian Han on CodePen.

License.

<select>
<option>Bulbasaur</option>
<option>Squirtle</option>
<option>Charmander</option>
</select>
@hellobrian
hellobrian / hide-merge-commits.js
Created February 23, 2016 00:25
hide merge commits
var commits = document.querySelectorAll('.commit-title a');
for (var i=0; i<commits.length; i++) {
commits[i].text.split(' ').forEach(function(word){
if (word === 'Merge') {
console.log(commits[i].parentNode.parentNode.parentNode);
commits[i].parentNode.parentNode.parentNode.style.display = "none";
}
});
}
@hellobrian
hellobrian / .sass-lint.yml
Created January 28, 2016 17:04
sass-lint config
# Linter Options
options:
# Don't merge default rules
merge-default-rules: false
# File Options
files:
include:
- './global/**/*.scss'
- './base-elements/**/*.scss'
- './components/**/*.scss'
@hellobrian
hellobrian / SassMeister-input.scss
Created November 24, 2015 23:41
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$white: #fff;
@mixin type($size, $color: $white) {
font-family: 'IBM Helvetica', Helvetica Neue, HelveticaNeue, Helvetica, sans-serif;
font-size: $size;
color: $color;
@hellobrian
hellobrian / SassMeister-input.scss
Last active November 24, 2015 23:40
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$white: #fff;
@mixin type($size, $color: $white) {
font-family: 'IBM Helvetica', Helvetica Neue, HelveticaNeue, Helvetica, sans-serif;
font-size: $size;
color: $color;
@hellobrian
hellobrian / SassMeister-input-HTML.html
Last active November 22, 2015 04:51
Blue and Grey / Dark to Light
<h1>Blue</h1>
<div class="container">
<div class="blue-dark">
<strong>blue-dark</strong>
<p>aka blue-70-mod</p>
<p>bluemix-color('blue-70')</p>
<p>#2D3F49</p>
<p>Page bg</p>
</div>
<div class="blue-darker">
@hellobrian
hellobrian / SassMeister-input-HTML.html
Created November 21, 2015 21:35
Generated by SassMeister.com.
<div class="container">
<div class="ibm-colors">
<h1>IBM Colors</h1>
<div class="blue-10">$blue-10</div>
<div class="blue-20"></div>
<div class="blue-30"></div>
<div class="blue-40"></div>
<div class="blue-90"></div>
<div class="gray"></div>
<div class="green"></div>
@hellobrian
hellobrian / SassMeister-rendered.html
Last active November 14, 2015 20:03
Generated by SassMeister.com.
<!-- html -->
<h1> blah</h1>
<h2 class="hi">hi</h2>