Skip to content

Instantly share code, notes, and snippets.

View Rio517's full-sized avatar

Mario Olivio Flores Rio517

View GitHub Profile
@Rio517
Rio517 / application.controller.js
Last active August 25, 2017 19:51 — forked from spieker/application.controller.js
nested JSON-API attributes ember example
import Ember from 'ember';
import Serializer from '../serializers/author';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
serialized: Ember.computed(function() {
return JSON.stringify(this.get('model').serialize(), null, 2);
})
});
@Rio517
Rio517 / _service.md
Last active January 15, 2016 13:52 — forked from naholyr/_service.md
Sample /etc/init.d script (with current github raw link)

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
#
# Paperclip convert id => id_partition
#
require 'ftools' #FileUtils
class PaperclipExtend
def self.obtain_class
class_name = ENV['CLASS'] || ENV['class']
uploads_path = ENV['UPLOADS_PATH'] || ENV['uploads_path']
raise "Must specify CLASS" unless class_name