Skip to content

Instantly share code, notes, and snippets.

@rorlab
rorlab / Gemfile
Created May 24, 2014 06:24 — forked from remino/Gemfile
# Gemfile
gem 'kramdown'
@rorlab
rorlab / p1.html
Last active January 3, 2016 20:59
Github Forking to Pull Request - images
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAa8AAADqCAYAAAAVicpqAAAKQWlDQ1BJQ0MgUHJvZmlsZQAASA2dlndUU9kWh8+9N73QEiIgJfQaegkg0jtIFQRRiUmAUAKGhCZ2RAVGFBEpVmRUwAFHhyJjRRQLg4Ji1wnyEFDGwVFEReXdjGsJ7601896a/cdZ39nnt9fZZ+9917oAUPyCBMJ0WAGANKFYFO7rwVwSE8vE9wIYEAEOWAHA4WZmBEf4RALU/L09mZmoSMaz9u4ugGS72yy/UCZz1v9/kSI3QyQGAApF1TY8fiYX5QKUU7PFGTL/BMr0lSkyhjEyFqEJoqwi48SvbPan5iu7yZiXJuShGlnOGbw0noy7UN6aJeGjjAShXJgl4GejfAdlvVRJmgDl9yjT0/icTAAwFJlfzOcmoWyJMkUUGe6J8gIACJTEObxyDov5OWieAHimZ+SKBIlJYqYR15hp5ejIZvrxs1P5YjErlMNN4Yh4TM/0tAyOMBeAr2+WRQElWW2ZaJHtrRzt7VnW5mj5v9nfHn5T/T3IevtV8Sbsz55BjJ5Z32zsrC+9FgD2JFqbHbO+lVUAtG0GQOXhrE/vIADyBQC03pzzHoZsXpLE4gwnC4vs7GxzAZ9rLivoN/ufgm/Kv4Y595nL7vtWO6YXP4EjSRUzZUXlpqemS0TMzAwOl89k/fcQ/+PAOWnNycMsnJ/AF/GF6FVR6JQJhIlou4U8gViQLmQKhH/V4X8YNicHGX6daxRodV8AfYU5ULhJB8hvPQBDIwMkbj96An3rWxAxCsi+vGitka9zjzJ6/uf6Hwtcim7hTEEiU+b2DI9kciWiLBmj34RswQISkAd0oAo0gS4wAixgDRyAM3AD3iAAhIBIEAOWAy5IAmlABLJBPtgACkEx2AF2g2pwANSBetAEToI2cAZcBFfADXALDIBHQAqGwUswAd6BaQiC8BAVokGqkBakD5lC1hAbWgh5Q0FQOBQDxUOJkBCSQP
require "faker"
FactoryGirl.define do
factory :post do
group
association :writer, factory: :user
content { Faker::Lorem.sentence }
factory :post_transactions do
after(:create) do |post|
create_list(:transaction, 4, post: post)
2013-12-10 09:18:47 executing `bundle:install'
* executing "cd /home/user1/apps/test_app/releases/20131210001847 && env RBENV_ROOT=\"/home/user1/.rbenv\" PATH=\"/home/user1/.rbenv/shims:/home/user1/.rbenv/bin:$PATH\" RBENV_VERSION=\"2.0.0-p195\" /home/user/.rbenv/bin/rbenv exec bundle install --gemfile /home/user/apps/test_app/releases/20131210001847/Gemfile --path /home/user/apps/test_app/shared/bundle --deployment --quiet --without development test"
servers: ["14.63.167.166"]
[14.63.167.166] executing command
** [out :: 14.63.167.166] fatal: Could not parse object '9c6c07f74ff515cf38380b014cfede14a4f0eae4'.
** [out :: 14.63.167.166] Git error: command `git reset --hard 9c6c07f74ff515cf38380b014cfede14a4f0eae4`
** [out :: 14.63.167.166] in directory
** [out :: 14.63.167.166] /home/user/apps/test_app/shared/bundle/ruby/2.0.0/bundler/gems/bootstrap-sass-9c6c07f74ff5
** [out :: 14.63.167.166] has failed.
** [out :: 14.63.167.166] If this error persists you could try removing the cache directory
$ rbenv install 2.0.0-p353
Downloading openssl-1.0.1e.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/66bf6f10f060d561929de96f9dfe5b8c
Installing openssl-1.0.1e...
Installed openssl-1.0.1e to /Users/hyo/.rbenv/versions/2.0.0-p353
Downloading ruby-2.0.0-p353.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/78282433fb697dd3613613ff55d734c1
Installing ruby-2.0.0-p353...
Installed ruby-2.0.0-p353 to /Users/hyo/.rbenv/versions/2.0.0-p353
<h3><%=t('head_title.share_your_stories')%></h3>
<div class="new_timeline_link">
<%= link_to t('timelines.add_your_story'), new_timeline_path, remote: true, id:"new_timeline_link" %>
</div>
<div id="new_timeline_form"></div>
<div id="timelines" class="timelines">
<% if @timelines.size > 0 %>
<%= render @timelines %>
'use strict';
angular.module('blogNgApp')
.controller('CommentsCtrl', [ '$scope', 'commentsFactory', function ($scope, commentsFactory) {
$scope.addCommentData = {};
$scope.addComment = function(){
commentsFactory.save({ post_id: $scope.post.id, comment: $scope.addCommentData },function(data){
$scope.post.comments.push(data);
console.log($scope.post.comments);
$scope.addCommentData = {};
<h3 id="title">Blog - AngularJS with Rails API</h3>
<div ng-controller="PostsCtrl">
<!--TODO: post 데이터 추가하기-->
<div class="row-fluid" style="margin-bottom:1em;">
<fieldset class="span12">
<legend>Post 추가</legend>
<label>제목</label>
<input type="text" ng-model="addPostData.title"><br/>

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt

Usage

= social_link_to "Tweet", 'twitter', { url: object_url(@object), text: @object.title }, 'data-share' => 'twitter'