A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
@import "compass/utilities/sprites"; // Include compass sprite helpers | |
@import "compass/css3/background-size"; // Include helper to calc background size | |
@mixin sprite($name, $hover: false, $active: false) { | |
@include retina-sprite($name, $sprites, $sprites2x, $hover, $active); | |
} | |
// The general purpose retina sprite mixin. | |
// |
module Abilities | |
def self.ability_for(user) | |
if user.admin? | |
AdminAbility.new(user) | |
else user | |
MemberAbility.new(user) | |
else | |
GuestAbility.new | |
end | |
end |
# Check if remote file exists | |
def remote_file_exists?(full_path) | |
'true' == capture("if [ -e #{full_path} ]; then echo 'true'; fi").strip | |
end | |
# Check if process is running | |
def remote_process_exists?(pid_file) | |
capture("ps -p $(cat #{pid_file}) ; true").strip.split("\n").size == 2 | |
end |
I watched these videos on 2012/12/14. Today's jQuery version is 1.8.3. So there might be some differences from the original video. I've briefly noted some of the differences between what described in the video and the current stable release. Most code he desribed can be found easily in speed/jquery-basic.js
(1.4.2).
2010-06-14 (jQuery 1.4.1)
http://blog.codeclimate.com/blog/2012/10/17/7-ways-to-decompose-fat-activerecord-models/
( 淡入 一群身著制服,表情嚴肅的軍官。)
會議桌的主位上,一位資深高階 將軍 正在說話。
將軍:報告已經證實了,紐約市已經…被殭屍占領了。
上校:又來了?明明 28 天前才發生過一次殭屍入侵!
將軍:這些僵屍…不一樣。它們是… 哲學 僵屍。
# encoding: utf-8 | |
# $ ruby check_bot.rb | |
require 'open-uri' | |
@url = 'https://registrano.com/events/handlino-new-opening/registrations/new' | |
def check? | |
open(@url) do |f| | |
f.each_line do |line| | |
if line.include? '抱歉,目前本活動已額滿。' |