Skip to content

Instantly share code, notes, and snippets.

View ArunMichaelDsouza's full-sized avatar

Arun Michael Dsouza ArunMichaelDsouza

View GitHub Profile
@ArunMichaelDsouza
ArunMichaelDsouza / mp3.js
Last active August 29, 2015 14:27 — forked from dtrce/mp3.js
streaming mp3 using nodejs
var http = require('http'),
fileSystem = require('fs'),
path = require('path')
util = require('util');
http.createServer(function(request, response) {
var filePath = 'path_to_file.mp3';
var stat = fileSystem.statSync(filePath);
response.writeHead(200, {
oua.directive('affixMenu', ['$window', '$filter', function ($window, $filter) {
"use strict";
return {
restrict:'A',
replace:false,
transclude:false,
link:function (scope, element) {
var moveableHeight = element.height();
.clearfix:after {
content: '';
clear: both;
display: table;
}

#Setting up Nginx on Your Local System ###by Keith Rosenberg

##Step 1 - Homebrew The first thing to do, if you're on a Mac, is to install homebrew from http://mxcl.github.io/homebrew/

The command to type into terminal to install homebrew is:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@ArunMichaelDsouza
ArunMichaelDsouza / Gruntfile.js
Created February 3, 2016 09:42
HAML "attrr-double quotes" grunt build config
module.exports = function(grunt) {
grunt.initConfig({
haml: {
dist: {
options: {
"double-quote-attributes": true,
style: 'expanded'
},
files: {
'index.html': 'index.haml'
@ArunMichaelDsouza
ArunMichaelDsouza / view.html.erb
Created March 18, 2016 09:14
Controller specific CSS/JS in Rails
<!-- Inject via regular symbol -->
<% content_for :css do %>
<%= stylesheet_link_tag "shop" -%>
<% end %>
<!-- Inject via controller symbol
<%= stylesheet_link_tag params[:controller] %>
@ArunMichaelDsouza
ArunMichaelDsouza / iterm2-solarized.md
Created October 7, 2016 20:59 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font (OS X / macOS)

Solarized

@ArunMichaelDsouza
ArunMichaelDsouza / webpack.config.js
Created October 18, 2016 23:38 — forked from learncodeacademy/webpack.config.js
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
@ArunMichaelDsouza
ArunMichaelDsouza / redux-form-tut.js
Created October 24, 2016 17:27 — forked from dmeents/redux-form-tut.js
The source code for the redux form tutorial on davidmeents.com
import React, { Component } from 'react';
import { Field, reduxForm } from 'redux-form';
import { connect } from 'react-redux';
import * as actions from '../../actions';
const form = reduxForm({
form: 'ReduxFormTutorial',
validate
});
@ArunMichaelDsouza
ArunMichaelDsouza / webpack.config.js
Created October 27, 2016 16:51
ES6 + JSX Webpack module bundling build script
module.exports = {
entry: './js/src/app.js',
output: {
filename: './js/build/bundle.js'
},
module: {
loaders: [
{
test: /\.jsx?$/,
loader: 'babel',