Skip to content

Instantly share code, notes, and snippets.

View new-village's full-sized avatar

new-village new-village

  • Tokyo, Japan
View GitHub Profile
@new-village
new-village / secret_token.rb
Created September 6, 2014 06:05
config/initializers/secret_token.rb
# Be sure to restart your server when you modify this file.
# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
# You can use `rake secret` to generate a secure secret key.
# Make sure your secret_key_base is kept private
@new-village
new-village / .gitignore
Created September 6, 2014 06:27
.gitignore
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
# Ignore bundler config.
/.bundle
# Ignore the default SQLite database.
@new-village
new-village / readme.md
Last active August 29, 2015 14:06
readme.md (first step)

# XAPP7
This Application is trainee's Feed (RSS) Reader.

## Purpose
* Understanding MVC Architecture and Ruby
* Study Resposive Design
* Stock Data for behavior analysis

source 'https://rubygems.org'
ruby '2.2.0'
# Base
gem 'rails', '4.1.0' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'sass-rails', '~> 4.0.3' # Use SCSS for stylesheets
gem 'uglifier', '>= 1.3.0' # Use Uglifier as compressor for JavaScript assets
gem 'coffee-rails', '~> 4.0.0' # Use CoffeeScript for .js.coffee assets and views
gem 'turbolinks' # Turbolinks makes following links in your web application faster.
gem 'jbuilder', '~> 2.0' # Build JSON APIs with ease.
@new-village
new-village / config
Created September 6, 2014 11:40
.bundle/config
---
BUNDLE_PATH: vendor/bundle # gemのインストール先
BUNDLE_WITHOUT: production # bundle install時に実行しないグループ
BUNDLE_DISABLE_SHARED_GEMS: '1' # システムにインストールされたGEMを使わない設定
@new-village
new-village / index.html.erb
Created September 6, 2014 15:20
app/views/mains/index.html.erb
<div class="main">
<article>
<ul class="alignleft tile1" id="1" onclick="read(1)"><li>aaa</li></ul>
<ul class="alignleft tile2" id="2" onclick="read(2)"><li>bbb</li></ul>
<ul class="alignleft tile1" id="3" onclick="read(3)"><li>ccc</li></ul>
<ul class="alignleft tile2" id="4" onclick="read(4)"><li>ddd</li></ul>
<ul class="alignleft tile2" id="5" onclick="read(5)"><li>eee</li></ul>
<ul class="alignleft tile3" id="6" onclick="read(6)"><li>fff</li></ul>
<ul class="alignleft tile1" id="7" onclick="read(7)"><li>ggg</li></ul>
</article>
@new-village
new-village / masonry.css.scss
Created September 6, 2014 15:23
app/assets/stylesheets/masonry.css.scss
article {
margin: 0 auto;
height: 100%;
}
article > ul {
width: 310px; // iphone4sに合わせて310pxとした
margin: 5px;
overflow: hidden;
list-style-type: none;
@new-village
new-village / masonry.js
Last active August 29, 2015 14:06
app/assets/javascripts/masonry.js
$(document).on('ready page:change', function(){
$('article').masonry({
itemSelector : 'ul',
isAnimated: true,
isFitWidth: true
});
});
@new-village
new-village / main.js
Created September 6, 2014 15:24
app/assets/javascripts/main.js
function read(fid){
var dom_obj=document.getElementById(fid);
var dom_obj_parent=dom_obj.parentNode;
dom_obj_parent.removeChild(dom_obj);
$("article").masonry("reload");
};
@new-village
new-village / OopLikeCode.sh
Last active August 29, 2015 14:13
オブジェクト指向ぽいシェルの書き方
# func test
function ExecOop() {
if `Check`; then
echo "success"
else
echo "failure"
fi
}
function Check() {