-
Web framework (on top of Rack)
-
Forked from Cuba
-
Core + Plugins
- Core: 440 LOC
- Total: 3200 LOC
server { | |
listen :80; | |
server_name www.example.com; | |
rewrite ^/(.*) http://example.com/$1 permanent; | |
} | |
server { | |
server_name example.com; | |
listen :80; | |
#!/usr/bin/env ruby | |
require 'rest-client' | |
require 'bundler' | |
CHECK_GEMS_BEFORE = Time.parse("Feb 8, 2015") | |
def check_bundler | |
gems = Bundler::LockfileParser.new(Bundler.read_file("Gemfile.lock")) | |
gems.specs.each do |spec| |
require 'cuba' | |
require 'mustache' | |
require 'mustache_on_cuba' | |
Cuba.use Rack::Session::Cookie | |
Cuba.plugin MustacheOnCuba | |
Cuba.settings[:mustache] = { | |
views: File.join(File.dirname(__FILE__), "views"), |
require "active_record" | |
ActiveRecord::Base.establish_connection('postgres:///testing') | |
ActiveRecord::Migration.verbose = false | |
ActiveRecord::Migration.class_eval do | |
create_table :played_quizzes, force: true do |t| | |
t.integer :player_ids, array: true | |
t.json :quiz_snapshot | |
end |
class MyView < Mustache | |
def markdown(str = nil) | |
if str | |
Markdown.new(str.to_s).to_html | |
else | |
lambda { |text| markdown(render(text)) } | |
end | |
end | |
end |
<?php | |
/** | |
* Plugin Name: Wp Remote Test | |
* Plugin URI: | |
* Version: 0.1 | |
* Description: Debug wp_remote_get and wp_remote_post | |
* Author: Damian Logghe | |
* Author URI: http://wp.timersys.com | |
*/ |
/* | |
Yahoo Finance stock historical data, prices and details retrieval function written in Javascript, jQuery and YQL | |
v2013-08-05 | |
(c) 2013 by Fincluster ltd - http://fincluster.com <[email protected]> | |
*/ | |
(function($) { | |
function getStock(opts, type, complete) { | |
var defs = { | |
desc: false, | |
baseURL: 'http://query.yahooapis.com/v1/public/yql?q=', |
FROM golang:1.6.2 | |
COPY . /go | |
RUN go get github.com/nats-io/nats | |
RUN go build api-server.go | |
EXPOSE 8080 | |
ENTRYPOINT ["/go/api-server"] |
#! /bin/bash | |
wordpressPath=/srv/wp01 | |
wordpressName=wordpress01 | |
wordpressPwd=pAssw0rd | |
wordpressUrl=wordpress01.example.com | |
################################## | |
mkdir -p "$wordpressPath"/db |