gem install rails
rails new my_app -T
Android applications can maintain their own internal preferences (and allow them to be modified by users) with very little coding. In fact, you don't even need to write an code to explicitly save these preferences, it's all handled automatically! | |
Create a new Android project, with an intial activity title Main. | |
Create two more activities: | |
ShowPrefs, which extends Activity | |
Set Prefs, which extends PreferenceActivity | |
Add these two to your AndroidManifest.xml file: |
du -h / | grep ^[0-9.]*G |
;; emacs kicker --- kick start emacs setup | |
;; Copyright (C) 2010 Dimitri Fontaine | |
;; | |
;; Author: Dimitri Fontaine <dim@tapoueh.org> | |
;; URL: https://github.com/dimitri/emacs-kicker | |
;; Created: 2011-04-15 | |
;; Keywords: emacs setup el-get kick-start starter-kit | |
;; Licence: WTFPL, grab your copy here: http://sam.zoy.org/wtfpl/ | |
;; | |
;; This file is NOT part of GNU Emacs. |
#where OFFSET is seconds | |
ActiveSupport::TimeZone.all.find { |z| ((z.now.dst? && z.utc_offset == OFFSET-3600) || (!z.now.dst? && z.utc_offset == OFFSET))} |
gem list | cut -d" " -f1 | xargs gem uninstall -aIx |
When I tried run "rake test", I received: | |
rake aborted! | |
cannot load such file -- openssl | |
Tasks: TOP => test:units => test:prepare => db:test:prepare => db:abort_if_pending_migrations => environment | |
(See full trace by running task with --trace) | |
sudo ipfw add 1 forward 127.0.0.1,3000 ip from any to any 80 in |
# config/initializers/omniauth.rb | |
module OmniAuth | |
module Strategies | |
# tell OmniAuth to load our strategy | |
autoload :Pixelation, 'lib/pixelation_strategy' | |
end | |
end | |
Rails.application.config.middleware.use OmniAuth::Builder do | |
provider :twitter, "app_name", "secret" |
(defun ruby-generate-tags() | |
(interactive) | |
(let ((root (ffip-project-root))) | |
(let ((my-tags-file (concat root "TAGS"))) | |
(message "Regenerating TAGS file: %s" my-tags-file) | |
(if (file-exists-p my-tags-file) | |
(delete-file my-tags-file)) | |
(shell-command | |
(format "find %s -iname '*.rb' | grep -v db | xargs ctags -a -e -f %s" | |
root my-tags-file)) |