Skip to content

Instantly share code, notes, and snippets.

View danielmatthew's full-sized avatar

Dan Matthew danielmatthew

View GitHub Profile
<div class="form-group">
<label id="listbox-label">Select a resource type</label>
<div class="c-fancy-listbox js-listbox-wrapper">
<button
class="
btn btn-primary btn-block
dropdown-toggle
c-fancy-listbox__toggle
js-listbox-toggle
"
@danielmatthew
danielmatthew / 6.txt
Last active January 28, 2018 14:38
Global Packages
/Users/dm/.nvm/versions/node/v6.9.5/lib
├── @storybook/cli@3.3.10
├── a11y@0.5.0
├── axe-cli@1.3.0
├── bower@1.8.2
├── create-react-app@1.0.0
├── eslint@4.12.1
├── firebase-tools@3.16.0
├── gatsby@1.9.128
├── lighthouse@2.6.0
@danielmatthew
danielmatthew / .travis.yml
Last active December 9, 2017 23:13
danmatthew.co.uk Travis config
branches:
only:
- master
language: ruby
rvm: 2.2
sudo: required
dist: trusty
cache:
- npm
install:
@danielmatthew
danielmatthew / console.js
Created June 28, 2016 07:24
SitePoint console.log example
if (console && console.log && window && window.localStorage && !window.localStorage["hide-watermark"]) {
console.log("%c", "font-size:34px; line-height:1.4em;");
var u = "color:#f9a141;font-weight:bold;"
, a = "color:#258aaf;font-weight:bold;"
, f = "font-size:34px; font-weight:200; letter-spacing:0.02em; line-height:1.4em; font-family:helvetica,arial; color:rgba(0,0,25,0.75);"
, l = "font-size:21px; font-weight:200; letter-spacing:0.2em; line-height:1.4em; font-family:helvetica,arial; color:rgba(0,0,25,0.5);";
console.log(" %cXX\n %cXXXXXX\n %cXXXXXXXXXX\n %cXXXXXXXXXXXX\n %cXXXXXXXXXXXX %cXX\n %cXXXXXXXXXXXX %cXXXXXX\n%cXXXXXXXXXXXX %cXXXXXXXXXX\n %cXXXXXXXXXXXX %cXXXXXXXXXXXX\n %cXXXXXXXXXXXX %cXXXXXXXXXXXX\n %cXXXXXXXXXXXX %cXXXXXXXXXXXX\n %cXXXXXXXXXX %cXXXXXXXXXXXX\n %cXXXXXX %cXXXXXXXXXXXX\n %cXX %cXXXXXXXXXXXX\n %cXXXXXXXX
@danielmatthew
danielmatthew / example.scss
Created June 13, 2016 10:25
!important use case
.input-group-btn > .btn {
background-color: $white;
border-color: $white;
border-left-color: $well-bg !important;
&:hover {
background-color: $gray-superlight;
border-color: $gray-superlight;
}
{
"bold_folder_labels": true,
"caret_extra_bottom": 2,
"caret_extra_top": 2,
"caret_extra_width": 3,
"caret_style": "phase",
"color_scheme": "Packages/Theme - Cobalt2/cobalt2.tmTheme",
"create_window_at_startup": false,
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
@danielmatthew
danielmatthew / gist:730c60ac76a55fcbc66c
Created November 1, 2015 15:12
Sync master and gh-pages
#[remote "origin"]
push = +refs/heads/master:refs/heads/gh-pages
push = +refs/heads/master:refs/heads/master
@danielmatthew
danielmatthew / .csscomb.json
Last active August 29, 2015 14:26
Preferred CSScomb settings
{
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
"color-shorthand": true,
"element-case": "lower",
"eof-newline": true,
"leading-zero": true,
"quotes": "double",
@danielmatthew
danielmatthew / sass-mq
Created April 30, 2015 12:15
Sass MQ Mixin
$medium-screen: 30em;
$big-screen: 50em;
@mixin medium {
@media (min-width: #{$medium-screen}) and (max-width: #{$big-screen} - 1px) {
@content;
}
}
@mixin large {
@danielmatthew
danielmatthew / gist:9205095
Created February 25, 2014 08:32
Reduces element margin on scroll. Useful with fixed element.
$(window).scroll(function()
{
$("#phone").css("margin-top",Math.max(0,970-$(this).scrollTop()));
});
}