Skip to content

Instantly share code, notes, and snippets.

View wyaeld's full-sized avatar
🐣
work in progress

Brad Murray wyaeld

🐣
work in progress
View GitHub Profile
@linjunpop
linjunpop / deploy-rails-4-app-with-dokku-on-digital-ocean.md
Last active September 11, 2024 10:21
Deploy Rails 4 app with Dokku on DigitalOcean

Deploy Rails 4 app with Dokku on DigitalOcean

Install dokku

First create a Ubuntu 13.04 x64 droplet on DigitalOcean Control Panel

Then ssh with root account, run this in termianl:

$ wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash
@deepak
deepak / Dockerfile
Last active December 8, 2024 08:48
Dockerfile for installing ruby using rbenv
# DOCKER-VERSION 0.4.8
# am facing issue
# https://github.com/dotcloud/docker/issues/1123
FROM ubuntu:12.04
MAINTAINER Deepak Kannan "[email protected]"
RUN apt-get -y install python-software-properties
@andrequeiroz
andrequeiroz / holtwinters.py
Last active February 3, 2025 04:35
Implementation of Holt-Winters algorithms in Python 2
#The MIT License (MIT)
#
#Copyright (c) 2015 Andre Queiroz
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:
@peterkeen
peterkeen / Dockerfile
Created June 27, 2013 05:43
My very first Dockerfile! It installs Ruby 2.0 from scratch, installs bundler, and then vendors in my app and installs dependencies.
MAINTAINER Pete Keen "[email protected]"
# Use Ubuntu 12.04 as the base image
FROM ubuntu:precise
# Install a bunch of prerequisites
RUN apt-get update
RUN apt-get install -y git-core curl wget libssl1.0.0 python-yaml build-essential libssl-dev
# Install ruby-build
@adamwiggins
adamwiggins / adams-heroku-values.md
Last active November 27, 2024 17:06
My Heroku values

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@elmariachi111
elmariachi111 / template-download
Last active October 5, 2024 22:27
JQuery-File-Upload templates written in Mustache / Handlebars
<tr class="template-download fade">
{{#error}}
<td></td>
<td class="name"><span>{{name}}</span></td>
<td class="size"><span></span></td>
<td class="error" colspan="2">
<span class="label label-important">{{error}}</span></td>
{{/error}}
{{^error}}
@andreypronin
andreypronin / setup_hstore.rb
Last active August 22, 2016 02:09
Migration to enable hstore for PostgreSQL with Rails 4. See also http://platformonrails.wordpress.com/2013/03/17/using-postgres…e-with-rails-4/
class SetupHstore < ActiveRecord::Migration
def self.up
enable_extension "hstore"
end
def self.down
disable_extension "hstore"
end
end
@cobyism
cobyism / gh-pages-deploy.md
Last active April 12, 2025 09:10
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@leemcalilly
leemcalilly / appassetsjavascriptsapplication.js
Created December 6, 2012 16:50
Checklist of File Changes for Setting up Refinery CMS with Twitter Bootstrap
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
@jlee42
jlee42 / strong_params_with_arrays.rb
Created November 3, 2012 19:12
Example of strong_parameters usage with arrays
params.require(:animal).permit(
:name, :description, :trainer_id, :photo_id, :video_id, :tag_list,
trainers_attributes: [:id, :first_name, :last_name, :_destroy]
)