Skip to content

Instantly share code, notes, and snippets.

Aaron Hamid ahamid

Block or report user

Report or block ahamid

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ahamid / Dockerfile
Created Jul 17, 2019
Docker tutorial part3
View Dockerfile
# Use an official Python runtime as a parent image
FROM python:2.7-slim
# Set the working directory to /app
# Copy the current directory contents into the container at /app
COPY . /app
# Install any needed packages specified in requirements.txt
ahamid / gist:4064dc457a80ced1ab29
Created Oct 24, 2014
Express recursive route matching can overflow stack
View gist:4064dc457a80ced1ab29
var express = require("express");
var app = express();
var TOO_MANY = 8000;
function handler(req, res) {
// test higher routes, eventually you will get
ahamid / gist:3777562
Created Sep 24, 2012
google closure compiler, type in IIFE
View gist:3777562
* @typedef {Object}
var vendor = Vendor = {};
// * @constructor
// */
//Vendor.VendorType = function() {};
ahamid / gist:3764001
Created Sep 21, 2012
closure compiler / rhino - find source of RValue
View gist:3764001
* Copyright 2012 Incandescent Software LLC
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
ahamid / gist:3626285
Created Sep 4, 2012
Comfortable Mexican Sofa render CMS content as partial
View gist:3626285
# config/initializers/comfortable_mexican_sofa.rb
require 'cms_renderer'
# lib/cms_renderer.rb
require 'action_view/renderer/renderer'
require 'action_view/renderer/template_renderer'
class CMSRenderer < ActionView::TemplateRenderer
ahamid / spec_helper.rb
Created Jul 29, 2012
benchmark + profile RSpec test
View spec_helper.rb
require 'ruby-prof'
require 'benchmark'
module BenchmarkHelpers
PROFILE_OUTPUT_DIR = "profiling"
def self.safe_filename(name)
name.gsub(" ", "_")
def self.example_output_target_file!(example)
ahamid / replace.go
Created Jul 4, 2012
whole file regexp replacement in go
View replace.go
package main
import (
func main() {
regexp, _ := regexp.Compile(os.Args[1])
ahamid / restorecon.rb
Created Jun 27, 2012
chef restorecon helper
View restorecon.rb
def restorecon_cmd(path)
%Q(restorecon "#{path}")
# restores selinux label for path
def restorecon(path)
execute restorecon_cmd(path) do
action :nothing
ahamid / gist:1665057
Created Jan 23, 2012
selectively adding hunk
View gist:1665057
[aaron@msi-cr620 workspace]$ cd hunk-test/
[aaron@msi-cr620 hunk-test]$ git init .
Initialized empty Git repository in /home/aaron/workspace/hunk-test/.git/
[aaron@msi-cr620 hunk-test]$ git branch
[aaron@msi-cr620 hunk-test]$ git branch -v
[aaron@msi-cr620 hunk-test]$ git status
# On branch master
# Initial commit
ahamid /
Created Dec 18, 2011
mirror unfuddle repo to bitbucket
echo "Cloning Unfuddle repo: $ufacct:$uf"
git clone --mirror git@$$ufacct/$uf.git
cd $uf.git
You can’t perform that action at this time.