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 / nginx.default.conf
Created January 28, 2016 09:45
Default NGINX Configuration
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@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 / spree.rb
Last active May 9, 2021 04:54
Solidus config for S3 file upload + CDN (Cloudfront) delivery
# Upload new product images to S3 and deliver via Cloudfront
Spree.config do |config|
attachment_config = {
s3_credentials: {
access_key_id: ENV.fetch("S3_ACCESS_KEY"),
secret_access_key: ENV.fetch("S3_SECRET"),
bucket: ENV.fetch("S3_BUCKET"),
},
@ArunMichaelDsouza
ArunMichaelDsouza / settings-user.json
Last active July 31, 2017 18:10
My Sublime Text Theme Configs
{
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
"font_size": 12,
"ignored_packages":
[
"Vintage"
],
"material_theme_compact_sidebar": true,
"material_theme_contrast_mode": true,
"material_theme_small_statusbar": true,
@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