Skip to content

Instantly share code, notes, and snippets.

-- Description:
-- ------------
--
-- This is an example schema for storing collectd metrics in a TimescaleDB
-- dabase (see https://www.timescale.com/). It is based on the PostgreSQL
-- schema contributed by Sebastian Harl.
--
-- Prerequisities:
-- ---------------
--

Keybase proof

I hereby claim:

  • I am felix on github.
  • I am xilef (https://keybase.io/xilef) on keybase.
  • I have a public key whose fingerprint is 971C F7B2 913A D163 70AC 02C3 B6F2 29D7 7E20 D10B

To claim this, I am signing this object:

@felix
felix / create.js
Created April 27, 2016 05:11 — forked from davidaurelio/create.js
Constructor-less inheritance for ECMAScript 5
var BaseObject = {
create: function create() {
var instance = Object.create(this);
instance._construct.apply(instance, arguments);
return instance;
},
extend: function extend(properties, propertyDescriptors) {
propertyDescriptors = propertyDescriptors || {};
require 'rubygems'
require 'dm-core'
DataMapper::Logger.new($stdout, :debug)
DataMapper.setup(:default, 'sqlite3::memory:')
class Person
include DataMapper::Resource
property :id, Serial
property :name , String, :required => true
class Application < Merb::Controller
before :set_lang
def _template_location(action, type = nil, controller = controller_name)
lang = params[:language]
action = "#{action}.#{lang}" unless lang == 'en'
_conditionally_append_extension(controller ? "#{controller}/#{action}" : "#{action}", type)
end
require 'rubygems'
if (local_gem_dir = File.join(File.dirname(__FILE__), 'gems'))
Gem.clear_paths; Gem.path.unshift(local_gem_dir)
else
puts 'not gonna load local gems'
end
require 'dm-core'
identify Package => :id do
match('/:listing/packages').with(:controller => 'packages') do
authenticate do
match('/new', :method => :get ).to(:action => 'new').name(:new_listing_package)
end
match('/:package/edit', :method => :get ).to(:action => 'edit').name(:edit_listing_package)
end
end
require 'rdoc/generator/xml'
module RDoc::Generator::XML::GOTAPI
BASE_URL = %{http://merbivore.com/documentation/current/doc/rdoc/stack/classes/}
METHODS = %{
<% if classes["sections"] then %>
<% classes["sections"].each do |sections| %>
<% if sections["method_list"] then %>
RewriteEngine on
RewriteRule ^/old-page.htm /new-page.shtml [redirect=permanent,L]
...