Skip to content

Instantly share code, notes, and snippets.

View joe-crick's full-sized avatar

Joe Crick joe-crick

View GitHub Profile
@joe-crick
joe-crick / UXofOS.md
Last active August 29, 2015 14:17 — forked from justinbmeyer/UXofOS.md

##Help Make Open Source Friendlier At Bitvoi, we agree with Yukihiro Matsumoto, the creator of Ruby: We want to make programmers happy. If you're like us, you're involved with Open Source because you love it. We believe that using CanJS, or any Open Source project, should be a joy.

Open Source is about community, innovation, contribution, and creativity. Making our tools easy to use and understand will help you unleash your creativity, make it easier for you to contribute to the community, and help make using CanJS fun!

We're usability testing our CanJS docs next week at our retreat in Austin, TX, and we need your help. We're looking for people to use and provide feedback on CanJS's Getting Started Guide. It will be a great opportunity for a lucky few to:

  • help improve open source,
  • learn a new technology stack, and
  • get paid doing it
@joe-crick
joe-crick / new line
Created March 26, 2016 01:06
bashrc new line
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
@joe-crick
joe-crick / flatten.js
Created April 18, 2016 15:36
Flatten an Arbitrarily Nested Array
/**
* @function flattenNestedArray
* @description Flattens an arbitrarily nested array
* @param {Array} arrayToFlatten The array to flatten
* @return {Array}
*/
function flattenNestedArray(arrayToFlatten){
var flattenedArray = [];
arrayToFlatten.forEach(function(item) {
if(Array.isArray(item)) {
@joe-crick
joe-crick / js-curry.js
Created February 7, 2018 05:43
JS Curry Example
// A sample Currying function
const partial = (f, ...as) => {
if (as.length === 0) { return f.call(); }
const a = as.shift();
if (a === undefined) { return f; }
const p = f.bind(f, a);
return partial(p, ...as);
}
// Composition function
@joe-crick
joe-crick / webpack.config.example.js
Last active February 26, 2018 16:10
Webpack 4 + CSS Modules + LESS
rules: [
// Whatever other rules you have here...
{
test: /\.less$/,
use: [
{
loader: "style-loader"
},
{
loader: "css-loader",
@nice-blue: #5B83AD;
@light-blue: @nice-blue + #111;
.header {
color: @light-blue;
}
import React from "react";
import style from "./sample.less";
const Header = () => (
<React.Fragment>
<div className={style.header}>My Header Text</div>
</React.Fragment>
);
export default Header;
const Count = props => (
  <div>
    The count is {props.count}
    <button onClick={props.increment}>increment</button>
    <button onClick={props.incrementAsync}>incrementAsync</button>
  </div>
)

const mapState = state =&gt; ({
import React from 'react';
import * as actions from './actions';
import connect from "reduxigen/connect";

export const Car = ({make, model, year, editCar}) => 
 <div>
  <dl>
   <dt>Name</dt>
 {make}
export default {
  people: [],
  currentPerson: {
    firstName: "",
    lastName: ""
  }
}