$ rails g model User
belongs_to
has_one
# Guide | |
# Configure the essential configurations below and do the following: | |
# | |
# Repository Creation: | |
# cap deploy:repository:create | |
# git add . | |
# git commit -am "initial commit" | |
# git push origin master | |
# | |
# Initial Deployment: |
from fabric.api import env, run, sudo, local, put | |
def production(): | |
"""Defines production environment""" | |
env.user = "deploy" | |
env.hosts = ['example.com',] | |
env.base_dir = "/var/www" | |
env.app_name = "app" | |
env.domain_name = "app.example.com" | |
env.domain_path = "%(base_dir)s/%(domain_name)s" % { 'base_dir':env.base_dir, 'domain_name':env.domain_name } |
require 'git' | |
module Jekyll | |
class GitActivityTag < Liquid::Tag | |
def initialize(tag_name, text, tokens) | |
super | |
end | |
def render(context) |
module Jekyll | |
class MathJaxBlockTag < Liquid::Tag | |
def render(context) | |
'<script type="math/tex; mode=display">' | |
end | |
end | |
class MathJaxInlineTag < Liquid::Tag | |
def render(context) | |
'<script type="math/tex">' | |
end |
license: gpl-3.0 |
##References
##Create Models
Create tables:
rails g model Location
rails g model User
rails g model Checkin
/** | |
* Convert "Kana" one from another | |
* (zen-kaku, han-kaku and more) | |
* | |
* @param string str | |
* @param string option (optionaly) | |
* @return string converted string | |
*/ | |
function convert_kana (str, option) { | |
option = option || "KV"; |
// Sharpen an image if it has become blurry due to upscaling or downscaling | |
// https://developer.mozilla.org/en/CSS/image-rendering | |
@mixin sharpen-image | |
image-rendering:-moz-crisp-edges | |
// When photos are upscaled or downscaled, they often get blurry. Don't use | |
// this on flat color images, they will still appear blurry. | |
// https://developer.mozilla.org/en/CSS/image-rendering | |
@mixin high-quality-image | |
image-rendering:optimizeQuality |
source 'https://rubygems.org' | |
gem 'rails', '3.2.9' | |
# Postgres Database | |
gem 'pg' | |
# Twitter API | |
gem 'twitter' |