Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Malven cmalven

View GitHub Profile
View programming_elixir_notes.ex
# Programming Elixir
## Value Types
# Integers
6
1_000_000
# Floating Point
View ecmascript-6-cheat-sheet.js
//
// ECMAScript 6 Cheat Sheet
//
//////////////////////////////////////////////////////////////////////
//---------------------------------------------------------------
// Arrows (and this)
//---------------------------------------------------------------
@cmalven
cmalven / check_user_camera.js
Created Sep 10, 2015
Check for availability of User Camera
View check_user_camera.js
if (Modernizr.getUserMedia || Modernizr.flash ) {
// The user has either getUserMedia or Flash available, so we can show the button.
$('.js-use-webcam-btn').show();
}
@cmalven
cmalven / install_php_mongo_mamp_os_x.md
Created Aug 7, 2015
Installing Mongo PHP extension for MAMP on Mac OS X
View install_php_mongo_mamp_os_x.md

Open your .bashrc or .zshrc file and add:

# Mamp PHP Path
export PATH=/Applications/MAMP/bin/php/php5.6.10/bin:$PATH

The version number here should correspond to the version you're using in MAMP.

Next, open /Applications/MAMP/bin/php/php5.6.10 and add a folder called include and within that a folder called php

@cmalven
cmalven / SassMeister-input.scss
Created Feb 11, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.1.0-beta)
// ----
$base-colors: (
red: #ea1c2c,
drkred: #5b0411,
ltred: #e28a91,
blue: #2daae1,
drkblue: #2596c7,
@cmalven
cmalven / SassMeister-input.scss
Created Feb 11, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.1.0-beta)
// ----
$base-colors: (
red: #ea1c2c,
drkred: #5b0411,
ltred: #e28a91,
blue: #2daae1,
drkblue: #2596c7,
@cmalven
cmalven / gulpfile.js
Last active Aug 29, 2015
Faking Sass Globbing
View gulpfile.js
// ...
gulp.task('concatStyles', function() {
return gulp.src(['assets/styles/objects/**/*.scss', 'assets/styles/layout/**/*.scss'])
.pipe(concat)
.pipe(gulp.dest('/'))
.pipe(concat('_combined-object-layout.scss'));
});
gulp.task('styles', ['concatStyles'], function() {
@cmalven
cmalven / notes-7-min-with-react.js
Created Feb 6, 2015
Notes on "7 Minutes with React"
View notes-7-min-with-react.js
// React JS Notes
// All of the following uses JSX compiling, without JSX the HTML-style syntax isn't possible.
// See this as a reference: http://jsbin.com/falicahequ/1/edit?html,js,output
// The basic unit of React is a "component", created like so...
var React = require('react');
var Component = React.createClass({
render: function() {
@cmalven
cmalven / index.js
Last active Aug 29, 2015
requirebin sketch
View index.js
var Collection = require('ampersand-collection');
var SubCollection = require('ampersand-subcollection');
var Model = require('ampersand-model');
var MyModel = Model.extend({
props: {
name: 'string',
selected: 'boolean'
}
});
@cmalven
cmalven / cheatsheet-layout-rendering-rails.md
Last active Oct 3, 2018
Cheat Sheet: Layouts and Rendering in Rails
View cheatsheet-layout-rendering-rails.md
You can’t perform that action at this time.