Skip to content

Instantly share code, notes, and snippets.

View petrosp's full-sized avatar

Petros petrosp

  • AMS-IX
  • Amsterdam
View GitHub Profile
@rstarmer
rstarmer / Dockerfile
Created December 31, 2015 09:41
A dockerfile to create a passenger ruby application environment and install our application from github
# See https://github.com/phusion/passenger-docker/blob/master/Changelog.md for
# a list of version numbers.
FROM phusion/passenger-ruby22:0.9.18
# Set correct environment variables.
ENV HOME /root
# Use baseimage-docker's init process.
CMD ["/sbin/my_init"]
@itsprdp
itsprdp / Dockerfile.rails-base
Last active September 9, 2016 04:21
RubyApp Dockerfile for staging
# Building rails-base image for the rubyapp
FROM phusion/passenger-ruby22
MAINTAINER Pradeep "[email protected]"
# Set correct environment variables.
ENV HOME /root
# Use baseimage-docker's init process.
CMD ["/sbin/my_init"]
@trabus
trabus / install_multiple_blueprints.js
Created September 30, 2015 22:05
Installing multiple blueprints from another blueprint
var RSVP = require('rsvp');
var assign = require('lodash/object/assign');
module.exports = {
description: '',
// creates an array of blueprints to install, for instance scaffolding
install: function(options){
var blueprints = [
{ blueprint: this.lookupBlueprint('account'),
options: options
},
@maxivak
maxivak / readme.md
Last active February 19, 2025 23:23
Integrating Gem/Engine and Main Rails App
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do
@kristianmandrup
kristianmandrup / Converting libraries to Ember CLI addons.md
Last active March 12, 2025 04:26
Guide to Developing Addons and Blueprints for Ember CLI

Converting libraries to Ember CLI addons

In this guide we will cover two main cases:

  • Ember specific library
  • vendor library

Ember library

The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.

@deepakkumarnd
deepakkumarnd / server_setup.sh
Last active October 8, 2024 00:49
Server setup script
# This script has to be run as a root user
echo "* Updating system"
apt-get update
apt-get -y upgrade
echo "* Installing packages"
apt-get -y install build-essential libmagickcore-dev imagemagick libmagickwand-dev libxml2-dev libxslt1-dev git-core nginx redis-server curl nodejs htop
id -u deploy &> /dev/null
if [ $? -ne 0 ]
  • Dynamic Dispatch
  • Dynamic Method
  • Ghost Methods
  • Dynamic Proxies
  • Blank Slate
  • Kernel Method
  • Flattening the Scope (aka Nested Lexical Scopes)
  • Context Probe
  • Class Eval (not really a 'spell' more just a demonstration of its usage)
  • Class Macros
@blackfalcon
blackfalcon / git-feature-workflow.md
Last active May 3, 2025 02:39
Git basics - a general workflow

Git-workflow vs feature branching

When working with Git, there are two prevailing workflows are Git workflow and feature branches. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited, and the focus of this article.

If you are new to Git and Git-workflows, I suggest reading the atlassian.com Git Workflow article in addition to this as there is more detail there than presented here.

I admit, using Bash in the command line with the standard configuration leaves a bit to be desired when it comes to awareness of state. A tool that I suggest using follows these instructions on setting up GIT Bash autocompletion. This tool will assist you to better visualize the state of a branc

@jtadeulopes
jtadeulopes / server.md
Last active March 29, 2024 10:23
Server setup with ubuntu, nginx and puma for rails app.

Update and upgrade the system

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove
sudo reboot

Configure timezone