Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Jason Staten statianzo

🎯
Focusing
View GitHub Profile
View Maybe.js
const Maybe = {
of (val) {
return val === null || val === undefined ? new Nothing : new Just(val)
},
catMaybes(xs) {
return xs
.filter(x => x instanceof Just)
.map(x => x.unwrap())
}
View keybase.md

Keybase proof

I hereby claim:

  • I am statianzo on github.
  • I am staten (https://keybase.io/staten) on keybase.
  • I have a public key ASDaKdLMDNGYorowF6pQqpN0a_UfBgYbnLZsix-wyoOrUAo

To claim this, I am signing this object:

@statianzo
statianzo / GitLineHistory.vim
Last active Aug 14, 2017
View the history of selected lines in git
View GitLineHistory.vim
function! GitLineHistory() range
exec ":vs | te git log -L '" . a:firstline . "," . a:lastline . ":%'"
endfunction
command! -range GitLineHistory <line1>,<line2>call GitLineHistory()
View error
[npmissue](master)$ npm outdated
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jasonstaten/.npm/_logs/2017-06-20T20_26_27_431Z-debug.log
View Button.js
//@flow
import React from 'react';
import Styled from './Styled';
import {View, TouchableOpacity, Text} from 'react-native';
type Props = {
children?: any,
};
View Styled.js
import React from 'react';
import {
View,
Image,
ListView,
ScrollView,
Text,
TouchableHighlight,
TouchableNativeFeedback,
@statianzo
statianzo / current.js
Last active Aug 30, 2016
unknown props warning
View current.js
const ContactBadge = (props) => (
<div className='Badge' {...props}>
<div>{props.user.name}</div>
<div>{props.contactMethod.type}</div>
</div>
);
export default connect((state, {userId, contactMethodId}) => ({
user: selectUser(state, userId),
contactMethod: selectContactMethod(state, contactMethodId)
@statianzo
statianzo / javascript.snippets
Created Jun 21, 2016
snipmate.vim javascript snippets
View javascript.snippets
snippet rsc
const ${1:`Filename()`} = (props) => (
<div>
</div>
);
export default $1;
snippet rc
class ${1:`Filename()`} extends React.Component {
render() {
return (
@statianzo
statianzo / Main.js
Created May 23, 2016
Purescript Counter
View Main.js
(function(exports) {
// Generated by psc version 0.8.5.0
"use strict";
var Prelude = PS["Prelude"];
var Control_Monad_Aff = PS["Control.Monad.Aff"];
var Control_Monad_Eff = PS["Control.Monad.Eff"];
var Halogen = PS["Halogen"];
var Halogen_Util = PS["Halogen.Util"];
var Halogen_HTML_Indexed = PS["Halogen.HTML.Indexed"];
var Halogen_HTML_Properties_Indexed = PS["Halogen.HTML.Properties.Indexed"];
View gist:3cddf1b6dc5a0b619be2
set wildignore +=*/.git/*
set wildignore +=*.ipc
set wildignore +=*.swp
set wildignore +=target
set wildignore +=project
set wildignore +=lib_managed
set wildignore +=_site
set wildignore +=node_modules
set wildignore +=cache
You can’t perform that action at this time.