Skip to content

Instantly share code, notes, and snippets.

Avatar
🎮
The Tetris effect

Richard Macarthy rjmacarthy

🎮
The Tetris effect
View GitHub Profile
@rjmacarthy
rjmacarthy / Concat and Minify Grunt
Last active Aug 29, 2015
Grunt concatination and minification helpers...
View Concat and Minify Grunt
/******
Concatinate css and js
*******/
concat: {
js: {
src: 'src/js/*.js',
dest: 'dest/js/concat.js'
},
css: {
@rjmacarthy
rjmacarthy / nginxconfig
Created Dec 4, 2014
Node.js Nginx Configuration
View nginxconfig
upstream app_website {
server 127.0.0.1:3000; // Port your node app is running on
}
# the nginx server instance
server {
listen 80;
server_name website.com;
return 301 http://www.website.com;
}
@rjmacarthy
rjmacarthy / expressgeneratorstart
Last active Aug 31, 2015
Start express generator
View expressgeneratorstart
Windows
-------
DEBUG=appname:* npm start
Linux
-------
Terminal 1
node-inspector
View Grunt file SASS
module.exports = function(grunt) {
grunt.initConfig({
sass: {
dist: {
options: {
includePaths: require('node-bourbon').includePaths,
includePaths: require('node-neat').includePaths
},
files: {
'public/css/style.css': 'public/scss/style.scss'
View bourbonGrunt
var path = require('path');
module.exports = function(grunt) {
grunt.initConfig({
sass: {
dist: {
options: {
includePaths: require('node-refills').includePaths
},
files: {
View SassPackageJson
{
"name": "bitcointestnetfaucet",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"express": "~4.9.0",
"body-parser": "~1.8.1",
View nodegypwindows
npm install <package> --msvs_version=<.net version>
@rjmacarthy
rjmacarthy / calcpricefiddle
Last active Aug 29, 2015
Calcular Price Fiddle
View calcpricefiddle
http://jsfiddle.net/v7tmu6ss/3/
View recactcounter
http://jsfiddle.net/kb3gN/8968/
@rjmacarthy
rjmacarthy / knockoutsample.js
Last active Aug 29, 2015
Knockout Sample With Initial Value
View knockoutsample.js
var ViewModel = {
inputValue : ko.observable()
};
ko.applyBindings(ViewModel);
var value = $('#text').data('value');
ViewModel.inputValue(value);