##Gingerbread It's like very simple ActiveRecord for Sinatra but uses cookies instead of databases
Use cookies in Sinatra like a boss!
Example:
require './gingerbread'
require 'sinatra'
##Gingerbread It's like very simple ActiveRecord for Sinatra but uses cookies instead of databases
Use cookies in Sinatra like a boss!
Example:
require './gingerbread'
require 'sinatra'
def attributes | |
attrs = {} | |
attribute_names.each { |name| attrs[name] = read_attribute(name) } | |
attrs | |
end | |
#vs | |
def attributes | |
attribute_names.inject({}) { |attrs, name| attrs[name] = read_attribute(name); attrs } |
Who is to blame?
Do you want to know who broke you tests?
http://whoistoblame.heroku.com/
Type your github name and project name and you will see who is to blame for broken test! (your project must use travis-ci for continuous integration)
For example: http://whoistoblame.heroku.com/?user=travis-ci&project=travis-ci
[ -f $HOME/.profile ] && . $HOME/.profile | |
HISTSIZE=1000 | |
SAVEHIST=1000 | |
HISTFILE=$HOME/.zsh_history | |
setopt append_history | |
setopt inc_append_history | |
setopt extended_history | |
setopt hist_find_no_dups | |
setopt hist_ignore_all_dups |
InteractiveCU is a simple interactive create and update for AR.
Examples:
Create:
ruby-1.9.2-p180 :007 > User
=> User(id: integer, name: string, created_at: datetime, updated_at: datetime)
ruby-1.9.2-p180 :008 > User.interactive_create # or User.ic
public Bitmap GetBitmap(BitmapSource source) | |
{ | |
Bitmap bmp = new Bitmap | |
( | |
source.PixelWidth, | |
source.PixelHeight, | |
System.Drawing.Imaging.PixelFormat.Format32bppPArgb | |
); | |
BitmapData data = bmp.LockBits |
<h1>Post:</h1> | |
<h2><%= @post.title %></h2> | |
<div style="margin:0 250px 0 250px"> | |
<pre> | |
<code class="<%= @post.language %>"><%= @post.source_code %></code> | |
</pre> | |
</div> | |
<%= raw(disqus_thread) %> |