Skip to content

Instantly share code, notes, and snippets.

View petrosp's full-sized avatar

Petros petrosp

  • AMS-IX
  • Amsterdam
View GitHub Profile
  • 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
@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 ]
@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.

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
@maxivak
maxivak / readme.md
Last active February 19, 2025 23:23
Integrating Gem/Engine and Main Rails App
@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
},
@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"]
@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
Last active September 9, 2016 04:22
Kuber files for Rails App + Google Container Engine
# Dockerfile
# Using phusion passenger as base image.
# Refer - https://github.com/phusion/passenger-docker
FROM phusion/passenger-ruby22:latest
MAINTAINER Pradeep <[email protected]>
# Set ENV variables
ENV HOME /rubyapp/
@donilan
donilan / Dockerfile
Last active June 27, 2018 08:05
Mina deploy.rb with Docker-passenger, Pull this docker at registry.aliyuncs.com/doni/passenger if you are work from China.
FROM phusion/passenger-full
# Set correct environment variables.
ENV HOME /root
# Use baseimage-docker's init process.
CMD ["/sbin/my_init"]
EXPOSE 80