This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Minimal view thingie to make code a bit more manageable. | |
# Usage example: | |
# | |
# class MyView extends View | |
# ui: | |
# button: '.my-button' | |
# events: | |
# 'click @ui.button': 'doAction' | |
# constructor: -> | |
# super |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# step : Integer | |
class Model < ActiveRecord::Base | |
with_options if: "step < 1" do |assoc| | |
validates :foo, presence: true | |
end | |
with_options if: "step < 2" do |assoc| | |
validates :bar, presence: true | |
end | |
# ... | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-tooltip/core-tooltip.html"> | |
<polymer-element name="my-element" fit=""> | |
<template> | |
<style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################### | |
### Set a remote repo ### | |
######################### | |
# via ssh | |
> mkdir projectdir.git | |
> cd projectdir.git | |
> git init --bare | |
or use http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ActiveRecord | |
class BaseWithoutTable < Base | |
self.abstract_class = true | |
# def create_or_update | |
# errors.empty? | |
# end | |
# def initialize(attributes = nil) | |
# super |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is used by Rack-based servers to start the application. | |
require ::File.expand_path('../config/environment', __FILE__) | |
WEBDAV_MOUNT_PATH = '/webdav' | |
app = Rack::Builder.new { | |
map WEBDAV_MOUNT_PATH + '/' do | |
run DAV4Rack::Handler.new( | |
:root => Rails.root.to_s, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is used by Rack-based servers to start the application. | |
require ::File.expand_path('../config/environment', __FILE__) | |
use ActionDispatch::Static | |
use Rack::Lock | |
use ActiveSupport::Cache::Strategy::LocalCache | |
use Rack::Runtime | |
use Rails::Rack::Logger | |
use ActionDispatch::ShowExceptions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'sinatra' | |
get '/' do | |
haml :index | |
end | |
enable :inline_templates | |
enable :run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########### | |
### MVC ### | |
########### | |
https://github.com/documentcloud/backbone | |
https://github.com/paulca/eyeballs.js | |
https://github.com/ahe/choco | |
https://github.com/maccman/superapp | |
http://www.sproutcore.com/ | |
http://javascriptmvc.com/ |
OlderNewer