Skip to content

Instantly share code, notes, and snippets.

View kristoferjoseph's full-sized avatar
🐈‍⬛

kj kristoferjoseph

🐈‍⬛
View GitHub Profile
:set cursorline
" keyboard shortcuts
inoremap jj <ESC>
nnoremap ; :
"NAVIGATION
nnoremap <up> <nop>
nnoremap <down> <nop>
nnoremap <left> <nop>
nnoremap <right> <nop>
@kristoferjoseph
kristoferjoseph / defend-default.js
Created May 11, 2016 20:42
npm i defend-default --save
//Defends against es2015 default export
function defendAgainstDefault(component) {
if (component.default) {
component = component.default
}
return component
}
@kristoferjoseph
kristoferjoseph / grid.css
Last active April 5, 2020 22:09
The simplest flexbox grid
.grid {
margin: 0 auto;
max-width: 75rem;
}
.padded {
padding: 0 2rem;
}
.gutters > .row {
@kristoferjoseph
kristoferjoseph / gist:7ea2763d71144689448b
Created May 21, 2015 21:02
Even better CSS4 variables
:root {
--primary-color: #d12028;
}
/* fallback values in case a variable is not supplied FTW */
body {
background: var(--primary-color, red);
}
@kristoferjoseph
kristoferjoseph / grid-mixins.scss
Last active August 29, 2015 14:15
Mixins for generating a grid
$viewport-xs: 30em;
$viewport-sm: 40em;
$viewport-md: 60em;
$viewport-lg: 75em;
$xs: 'xs';
$sm: 'sm';
$md: 'md';
$lg: 'lg';
@kristoferjoseph
kristoferjoseph / SassMeister-input.scss
Created January 14, 2015 22:54
Generated by SassMeister.com.
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// ----
.calendar {
width: 20rem;
&__event {
background: blue;
&--disabled {

Keybase proof

I hereby claim:

  • I am kristoferjoseph on github.
  • I am dam (https://keybase.io/dam) on keybase.
  • I have a public key whose fingerprint is C57C BCA0 3E80 13C3 76AA 8790 68C9 8869 1845 EC5E

To claim this, I am signing this object:

/*
* Scale CSS
* =========
*
* API
* ---
*
* Use an @import file to override the
* `--ratio` variable.
* Default is the golden ratio or phi
@kristoferjoseph
kristoferjoseph / index.js
Last active August 29, 2015 13:57
Simplest livereload development server I could make
var express = require('express'),
instant = require('instant'),
colors = require('colors'),
app = express();
app.use(instant(__dirname));
app.listen(3000,
console.log('Navigate to ' + 'http://localhost:3000'.green + ' to view your page')
);
@kristoferjoseph
kristoferjoseph / nodemodule.js
Created March 8, 2014 20:07
Node modules example
var awesomeModule = require('awesome-module');
module.exports = function() {
var myThing = {};
return awesomeModule.doStuff(myThing);
};