Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View patrickmarabeas's full-sized avatar
:shipit:
The bear is sticky with honey

Patrick Marabeas patrickmarabeas

:shipit:
The bear is sticky with honey
  • ANZ Bank
  • Melbourne, Australia
View GitHub Profile
@patrickmarabeas
patrickmarabeas / _filePathsToPackageNames.js
Last active July 12, 2017 04:33
Lerna publishing only changed packages (ignore transitive dependants)
#!/usr/bin/env node
/**
* Accepts a string of space separated files generated by git
* Returns a string of comma separated @scoped/package names
*/
const commander = require('commander');
const packageRootMatch = /^packages\//;
@patrickmarabeas
patrickmarabeas / component.js
Last active June 23, 2017 03:26
Multiple package version dependencies
import DayPicker as foo from 'react-day-picker@5.2.0'
import DayPicker as bar from 'react-day-picker@5.2.1'
import DayPicker as baz from 'react-day-picker@5.2.2'
@patrickmarabeas
patrickmarabeas / master-ghpages
Created November 17, 2013 21:09
GitHub push master to gh:pages
git push -f origin master:gh-pages
@patrickmarabeas
patrickmarabeas / LESS specific fonts for different font sizes.less
Last active December 15, 2015 21:49
Using a LESS mixin for font-size allows us to have font-family determined dynamically based on font-size
.fontSize (@a) when (@a >= 100) {
font-family: Impact, Charcoal, sans-serif;
}
.fontSize (@a) when (@a < 100) {
font-family: "Comic Sans MS", cursive, sans-serif;
}
.fontSize (@a) {
font-size: @a;
}
@patrickmarabeas
patrickmarabeas / LESS nesting for parental examination.less
Last active December 15, 2015 21:49
LESS nesting for parental examination - In this example we wish to assist our media queries with JavaScript to determine if the device is a mobile device or not. Our JavaScript will place a class or attribute on the body tag. When we get to our media queries, we only want to apply the code if body has the class or attribute confirming the device…
body {
/* this has the possible class or data attribute of 'mobile' */
/* this is not included in the nest as you can't climb at will */
/* the class or attribute (via our JavaScript) could be applied
to any element that sits above and outside of `#level-1` in
this example */
}
#level-1 {