Skip to content

Instantly share code, notes, and snippets.

View markbrown4's full-sized avatar

Mark Brown markbrown4

View GitHub Profile
var express = require('express')
, http = require('http')
, async = require('async')
, multer = require('multer')
, upload = multer({ dest: 'uploads/' })
, exphbs = require('express-handlebars')
, easyimg = require('easyimage')
, _ = require('lodash')
, cv = require('opencv');
if (this.props.store.submissionInProgress) {
className = styles.inProgress
} else if (this.props.store.errorOccurred) {
className = styles.error
} else if (!this.props.form.valid) {
className = styles.disabled
} else {
className = styles.normal
}
@markbrown4
markbrown4 / csrf.md
Created May 4, 2015 06:34
csrf token error in chrome
  1. run server
  2. login
  3. stop server
  4. run server again
  5. logout
  6. login

💥 ActionController::InvalidAuthenticityToken

@markbrown4
markbrown4 / new-york.md
Created October 8, 2014 21:58
Places in New York - The definitive guide

Places to eat

ShakeShack

@markbrown4
markbrown4 / nesting.scss
Created October 2, 2014 23:14
css nested selectors
/* It's common to want to make the selector nesting the same as the dom */
#content {
.nav {
ul {
margin: 0;
padding: 0;
li {
float: left;
margin: 0;
@markbrown4
markbrown4 / angular-fuzzy-search.html
Last active August 29, 2015 14:05
Angular's fuzzy search
<input type="text" placeholder="Search for your team" ng-model="team_query">
<ul class="teams" ng-show="team_query.length > 2">
<li ng-repeat="team in teams | filter : team_query | limitTo : 5">
<img ng-src="{{ team.avatar_url }}">
<h2>{{ team.name }}</h2>
<small>{{ team.member_count }}</small>
<p>{{ team.bio }}</p>
</li>
</ul>
@markbrown4
markbrown4 / diamonds.html
Last active August 29, 2015 14:05
CSS triangles
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>diamonds</title>
<style type="text/css">
#diamonds {
width: 480px;
height: 480px;
@markbrown4
markbrown4 / gulpfile.js
Last active August 29, 2015 14:00
gulpfile for compiling coffee, sass/autoprefixer and handlebars.
var gulp = require('gulp');
var gutil = require('gulp-util');
var sass = require('gulp-sass');
var coffee = require('gulp-coffee');
var autoprefix = require('gulp-autoprefixer');
var handlebars = require('gulp-handlebars');
var defineModule = require('gulp-define-module');
var paths = {
scripts: {
@markbrown4
markbrown4 / dabblet.css
Created November 30, 2013 01:02
Untitled
#spinner {
width: 150px;height: 150px;
-webkit-animation: sweep 1s infinite linear;
border-radius:75px;
border-bottom:5px solid blue;
}