Skip to content

Instantly share code, notes, and snippets.

@chantastic
chantastic / package.json
Last active Aug 29, 2015
@learnreact—React on Rails: Testing with Jest
View package.json
{
"scripts": {
"test": "jest"
},
"jest": {
"scriptPreprocessor": "<rootDir>/preprocessor.js",
"unmockedModulePathPatterns": ["<rootDir>/node_modules/react"]
}
}
View AudioFileStepSelector.coffee
# My First React Component
# Added to this Gist for posterity.
# Extracted from https://github.com/ministrycentered/transposr/commit/fa616871914ac16b72d0d1b035a08e01e337bd07
# January 08, 2014
{ div, input } = React.DOM
AudioFileStepSelector = React.createClass
getInitialState: ->
halfSteps: 2
View gist:65dc78e3e234aecce2c0
Accounts - branch/0-2-0
Check-ins - branch/0-0-4
People - branch/0-0-4
Resources - branch/0-0-4-2
Registrations - branch/develop
@chantastic
chantastic / private_member.coffee
Created Sep 2, 2014
CoffeeScript Private Methods
View private_member.coffee
class WithPrivate
constructor: (name)->
name = name
@getName = =>
name
@setName = (newName) =>
name = newName
@chantastic
chantastic / script.markdown
Created Aug 11, 2014
Full Stack Labs: Web Basics — HTML
View script.markdown

Web Basics — HTML

The year is 1989

The year is 1989 and there's a man named Tim Berners-Lee. Tim looks a lot like a scienc-y, late-career, Bradley Whitford but without the molestache.

Tim was putting together a mix tape of Peter Gabriel, Hall & Oates, and KISS when when he thought: "I need a better way to share my science-stuff.doc file withe the world." and

BOOM. The Web.

View jsbin.juvixufu.html
<html>
<head>
<title>Select styles with CSS only</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
background-color: #fff;
font-family: helvetica, sans-serif;
margin: 4% 10%
@chantastic
chantastic / index.html
Last active Aug 29, 2015
Full Stack: Angular 101 Workshop (concepts)
View index.html
<!doctype html>
<!-- exercise 1 -->
<!-- bootstraping an angular app -->
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.8/angular.min.js"></script>
</head>
<body>
@chantastic
chantastic / SassMeister-input.scss
Created Apr 29, 2014
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.3.5)
// Compass (v1.0.0.alpha.18)
// ----
@each $h, $font-size in (h1: 2em, h2: 1.5em, h3: 1.2em) {
#{$h} {
font-size: $font-size;
}
}
@chantastic
chantastic / .projections.json
Last active Oct 19, 2017
ember-cli VIM projections
View .projections.json
{
"app/adapters/*.js": {
"command": "adapter",
"template": [
"// export default DS.{capitalize}Adapter.extend();",
]
},
"app/components/*.js": {
"command": "component",