Skip to content

Instantly share code, notes, and snippets.

@ryanseddon
ryanseddon / npm-debug.log
Created December 28, 2013 02:12
npm untrusted certificate issues
0 info it worked if it ends with ok
1 verbose cli [ 'node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'search',
1 verbose cli 'es6-module-transpiler' ]
2 info using npm@1.1.33
3 info using node@v0.8.1
4 verbose config file /Users/Ryan/.npmrc
5 verbose config file /usr/local/etc/npmrc
6 verbose config file /usr/local/lib/node_modules/npm/npmrc
@ryanseddon
ryanseddon / gulpfile.js
Created January 5, 2014 00:08
Gulp + browserify conundrum. How can I get browserify to properly transform the es6 module syntax to CommonJS syntax and pass along the stream so browserify can figure out how to bundle up the file into a single dist release? Is this possible?
var gulp = require('gulp');
var es6ModuleTranspiler = require('gulp-es6-module-transpiler');
var browserify = require('gulp-browserify');
var through = require('through');
function transpileModuleSyntax(file) {
var data = '';
return through(write, end);
function write (buf) { data += buf }
@ryanseddon
ryanseddon / idiot.js
Created August 18, 2014 10:36
Typical code written by a tab supporter
var IE = 0,
OLD = 0;
function doListen() {
if(navigator.appName.indexOf("Explorer") > 0) IE = 1;
if(IE!=1 && parseInt(navigator.appVersion) == 4) {
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown = mtMenu;
OLD=1;

Keybase proof

I hereby claim:

  • I am ryanseddon on github.
  • I am ryanseddon (https://keybase.io/ryanseddon) on keybase.
  • I have a public key whose fingerprint is 872E D0C3 2045 FF3A B02F 5630 92B5 512B 0ABC 22CF

To claim this, I am signing this object:

@ryanseddon
ryanseddon / _readme.md
Last active August 29, 2015 14:22
Webpack and css npm packages

Importing CSS packages via npm

If I have a package from npm let's say inuit-starter-kit which is a shell package that has its own dependencies. So all the packages I want to import exist in inuit-starter-kit/node_modules/{package}/{package}.scss.

Webpack

Webpack is configured to run all .scss files through sass-loader and then css-loader.

My entry file main.scss @imports all the deps using ~ to make sure it looks in node_modules

@ryanseddon
ryanseddon / cli.bash
Created October 9, 2015 05:44
Mocha compiler for css-module support in tests using sass
mocha --compilers js:babel/register,js:./test/css-modules-compiler.js --recursive -w
@ryanseddon
ryanseddon / dark.css
Created January 27, 2016 03:36
glittering.blue
/* What? */
html, body, section {
height: 100%;
}
body {
background-color: black;
font-family: sans-serif;
color: #aaa;

Keybase proof

I hereby claim:

  • I am ryanseddon on github.
  • I am ryanseddon (https://keybase.io/ryanseddon) on keybase.
  • I have a public key ASALcuRRJgjeiZhwtUQauzfB3JG1vWS0cymBniHrjspJ7wo

To claim this, I am signing this object:

@ryanseddon
ryanseddon / TabContainer.js
Created June 18, 2019 00:52
Part of a blog post
function TabContainer({ children, render = children, ...options }) {
return render(useTabs(...options);
}
@ryanseddon
ryanseddon / TabHook.js
Created June 18, 2019 00:54
Part of blog post
const {
selectedItem,
focusedItem,
getTabProps,
getTabListProps,
getTabPanelProps
} = useTabs();