run_load_hooks(:action_mailer, self)
run_load_hooks(:action_controller, self)
run_load_hooks(:action_view, self)
run_load_hooks(:active_record, Base)
run_load_hooks(:i18n)
run_load_hooks(:active_record, ActiveRecord::Base)
run_load_hooks(:basic_hook)
run_load_hooks(:basic_hook_with_two, FakeContext.new(2))
run_load_hooks(:basic_hook_with_two, FakeContext.new(5))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| brew install caskroom/cask/brew-cask rbenv ruby-build | |
| brew tap caskroom/versions | |
| brew cask instal iterm2 sublime-text3 | |
| echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
| source ~/.bash_profile | |
| rbenv install 2.1.3 | |
| rbenv global 2.1.3 | |
| gem update --system |
- 到官方網站下載兩個東西:
-
Source Code (for header file)
-
Precompiled Binaries for Windows (for DLL file)
-
由於 SQLite3 官方沒有提供 64 位元的 DLL,我們得自己編譯,好消息是當我們按照 DevKit 安裝手冊完成安裝後就有編譯器可用,以筆者為例,位置在 C:\DevKit\mingw\bin\gcc.exe。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var recognition = new webkitSpeechRecognition(); | |
| recognition.continuous = true; | |
| recognition.lang = 'cmn-Hant-TW'; | |
| recognition.onerror = function(event){console.error(event)} | |
| recognition.onresult = function(event){ | |
| str = event.results[event.resultIndex][0].transcript | |
| switch(true){ | |
| case /下一?頁$|next page$|next$/.test(str): | |
| Reveal.next(); | |
| console.info(str); |
- Go to YouTube to find the video that you want to download.
- Copy the script to your browser navigation bar, then you'll get the download URL.
- You can save it to your bookmark.
Note: This script does not support HTML5 player since it's much easier to retrieve the source URL by viewing the source page.
- 到 YouTube 瀏覽你要下載的的影片網址。
- 將程式碼貼到網址列上(含前面的
javascript:),你將得到一個載點。 - 你可以將此程式碼存到你的書籤。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Usage: | |
| # > rails new myapp -m https://gist.github.com/raw/4010690/d9106a1c3af695d1ed4ef8d16e3c8a06b5e3c7f3/tj_rails_template.rb | |
| config = {} | |
| puts "Gems:" | |
| config[:install_devise_cancan_rolify] = yes? "install devise, cancan, rolify?" | |
| config[:install_form_helpers] = yes? "install simple_form, dynamic_form, nested_form?" | |
| config[:install_bootstrap_tjstyle] = yes? "install bootstrap, tjstyle?" | |
| config[:install_rspec_spork] = yes? "install rspec, spork?" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # usage rake new_page[my-new-page] or rake new_page[my-new-page.html] or rake new_page (defaults to "new-page.markdown") | |
| desc "List all posts with an asterisk if it's published. Advanced usage: 'rake list_posts[pub|unpub]'" | |
| task :list_posts, :type do |t, args| | |
| type = args.type | |
| result = "" | |
| Dir.glob("#{source_dir}/#{posts_dir}/*.markdown").sort.each do |post| | |
| file = File.read(post) | |
| file =~ /^(---\s*\n.*?\n?)^(---\s*$\n?)/m | |
| data = YAML.load($1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =begin | |
| ## Description | |
| A tool for Octopress to generate IDs in header tags and index list aside. It helps you easily build a tutorial page with many chapters. | |
| ## Features | |
| * Support all languages. | |
| ## Syntax |
NewerOlder