Skip to content

Instantly share code, notes, and snippets.

root
@rubydoc
rubydoc / scss2sass.sh
Last active August 29, 2015 14:12 — forked from sanxac/scss2sass.sh
#!/bin/bash
for f in *.scss; do sass-convert $f ${f%scss}sass ; done
rm *.scss
@rubydoc
rubydoc / user.rb
Last active August 29, 2015 14:05
faster json
class User < ActiveRecord::Base
before_save do |user|
user.json_cache = user.as_json
end
def as_json options={}
{
id: id,
name: name
}
<input type="text" ng-model="$parent.$parent.hello">
require 'open-uri'
require 'nokogiri'
require 'pp'
require 'active_support/all'
class Video
def initialize item
@title = item.css(".yt-lockup-title").at_css("a").try(:text)
# @thumb_url = item.css(".video-thumb").at_css("img")[:src]
# @url = "http://www.youtube.com" + item.css(".yt-lockup-thumbnail").at_css("a")[:href]
@rubydoc
rubydoc / gist:7055754
Last active May 21, 2018 01:06
어떻게 Pixar는 collective creativity를 발전시켰나

어떻게 Pixar는 collective creativity를 발전시켰나

by Ed Catmull

Idea 요약 설명

한 로봇이 종말 이후의 세계에서 사랑에 빠진다. 프랑스의 쥐 한마리는 쉐프가 될 준비를 시작한다. 교외에 사는 슈퍼히어로 가족은 권력에 굶주린 악당을 물리친다. 모두다 쉽게 상상할 수 없는 아이디어들이다 - 하지만 픽사는 이 모든 것들과 다른 소설들을 블록버스터 영화로 만들어 낸다.

어떻게 그렇게 할 수 있을까? Catmull이 설명하듯, 픽사의 수장들은 창의적 조직을 만들고 굴러가게 하는 강력한 관습을 발견해냈다. 예를 들어, 그들은 작가, 아티스트, 그리고 다른 "창조하는 일을 하는 사람들"에게 결정할 수 있는 많은 재량권을 주었다. 그들은 사람들이 완성되지 않은 작업물을 동료들과 공유하는 것에 거리낌을 느끼지 않도록 했으며, 솔직한 피드백을 주었다. 그리고 그들은 하나의 프로젝트가 끝난 뒤 후속 프로젝트들의 위험성을 줄일 수 있도록 도와주는 귀중한 교훈들을 정리하는 프로젝트를 진행하였다.

이러한 노력들은 좋은 결실을 맺게 되었다. 픽사는 컴퓨터 애니메이션 분야의 선구자라는 성공적 지위를 가진 유일무이한 회사가 되었다. 픽사는 외부에서 대본이나 영화의 아이디어를 사들인 적이 없다. 그리고 1995년 이래로 7개의 작품을 내놓았으며, 모든 작품은 매우 큰 성공을 거두었다.

@rubydoc
rubydoc / gist:6987853
Created October 15, 2013 07:28
node_orm
var orm = require('orm'),
async = require('async'),
_ = require('underscore');
var seed = false;
var show = true;
var _delete = false;
orm.settings.set("connection.debug", true);
@rubydoc
rubydoc / Gemfile
Created September 5, 2013 04:17
Self Number
source 'https://rubygems.org'
gem 'rspec'
@rubydoc
rubydoc / gist:6255152
Last active December 21, 2015 05:09
Walker // TODO :: need to order by orderRule
// TODO :: need to order by orderRule
var Walker = function(dirPath, orderRule, whitelist, blacklist){
if (blacklist === undefined){ blacklist = function(path){ return false; }; };
if (whitelist === undefined){ whitelist = function(path){ return true; }; };
if (orderRule == undefined) { orderRule = function(a, b){ return -1; }; };
if (dirPath == undefined) {
console.log('please input root directory path.');
return false;
}
@rubydoc
rubydoc / Gemfile-rails4.0.0.beta1
Last active December 16, 2015 03:19
victorkim's gem list on rails 4
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0.beta1'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 4.0.0.beta1'