List MySQL Configurations
mysql> show variables;

titsay
AnasAbdin
Cosmic Funnies
Mike Driver
Sweet Seals For You, Always
d e v o n

★

roma★

izzy's playlists!
Lint Roller? I Barely Know Her
i don't do bad sauce passes
NASA
almost home
art blog(derogatory)
we're not kids anymore.
todays bird
Monterey Bay Aquarium

Kiana Khansmith

@theartofmadeline
$LAYYYTER
seen from United States
seen from Türkiye
seen from Türkiye

seen from United States

seen from Ireland
seen from United Kingdom
seen from Spain

seen from United States

seen from France
seen from United States
seen from Türkiye
seen from Italy
seen from United States

seen from Algeria
seen from Netherlands

seen from Malaysia

seen from United States
seen from United States
seen from United States

seen from United States
@domon-web
List MySQL Configurations
mysql> show variables;

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
jQuery Tips
## Use a fallback for CDN version window.jQuery || document.write('<script src="js/libs/jquery-1.7.2.min.js"><\/script>') ## Chain stuff Instead of this: $(“#mydiv”).hide(); $(“#mydiv”).css(“padding-left”, “50px”); Use this: $(“#mydiv”).hide().css(“padding-left”, “50px”); ## Cache stuff var $mydiv = $(“#mydiv”).hide(); $mydiv.show(); ## Use pure js $mydiv[0].setAttribute('class', 'awesome'); //you can convert jQuery objects to DOM nodes using $jqObj[0] ## Reference * [9 jQuery Mistakes you Shouldn’t Commit](http://webdesignledger.com/tips/9-jquery-mistakes-you-shouldnt-commit)
> cat -v typescript | sed -e "s/\x1b\[.\{1,5\}m//g"
> In jQuery, the `fn` property is just an alias to the `prototype` property.
> View > Make Text Bigger, Make Text Normal Size or Make Text Smaller

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
super
When you invoke super with no arguments, Ruby sends a message to the current object's parent, asking it to invoke a method of the same name as the current method, and passing it the parameters that were passed to the current method.
class KaraokeSong < Song def to_s super + " [#{@lyrics}]" end end aSong = KaraokeSong.new("My Way", "Sinatra", 225, "And now, the...") aSong.to_s # => "Song: My Way--Sinatra (225) [And now, the...]"
Reference
Programming Ruby: The Pragmatic Programmer's Guide
Marshalling
> In computer science, marshalling (sometimes spelled marshaling, similar to serialization) is the process of transforming the memory representation of an object to a data format suitable for storage or transmission. It is typically used when data must be moved between different parts of a computer program or from one program to another.
Mac Key Bindings
To make the Home and End keys move to the beginning and end of the current line (not the document), we can create a file called `~/Library/KeyBindings/DefaultKeyBinding.dict` and put the following lines into it: { /* Home and Shift-Home */ "\UF729" = "moveToBeginningOfLine:"; "$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* End and Shift-End */ "\UF72B" = "moveToEndOfLine:"; "$\UF72B" = "moveToEndOfLineAndModifySelection:"; } ## References * [Mac Switchers Tip: Remap the Home and End keys](http://lifehacker.com/225873/mac-switchers-tip--remap-the-home-and-end-keys) * [TextMate Blog » Key bindings for switchers](http://blog.macromates.com/2005/key-bindings-for-switchers/)
Setting session name in screen
Create a new session with a session name: screen -S your_session_name Change the session name of current screen: C-a :sessionname your_session_name ## Reference * [Setting session name in screen](http://holmwood.id.au/~lindsay/2008/09/29/setting-session-name-in-screen/)
Disk Utility
To check and repair permissions, click: `Verify Disk Permissions` and `Repair Disk Permissions`. ## Reference * [About Disk Utility's Repair Disk Permissions feature](http://support.apple.com/kb/HT1452)

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
asset_path and asset_host
`asset_path(source)` 預設會給 path,但 `config/environments/production.rb` 裡設定了 `asset_host` 時,會回傳完整的 url,包含 protocol 與 host。 ## Reference * [ActionView::Helpers::AssetTagHelper](http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html)
Remove a file from the repository, but keep it in the working directory
Simply use: git rm --cached ## Reference * [git ready » ignoring doesn't remove a file](http://gitready.com/beginner/2009/03/06/ignoring-doesnt-remove-a-file.html)
deadlock; recursive locking (ThreadError)
I encountered this error when running a cucumber test: deadlock; recursive locking (ThreadError) :8:in `lock' :8:in `synchronize' It came the `gmail` gem. This is a known issue but have not yet been solved. Though there is a workaround provided by [saranyan](https://github.com/saranyan) which resolved the problem for me. Add ta line to `lib/gmail/client/base.rb`, in the beginning of the definition of the `mailbox(name, &block)` method: def mailbox(name, &block) + @mailbox_mutex = Mutex.new @mailbox_mutex.synchronize do ## Reference * [#28: Added Mutex.new statement to prevent deadlocking error by saranyan for nu7hatch/gmail - Pull Request - GitHub](https://github.com/nu7hatch/gmail/pull/28)
has_and_belongs_to_many
設定 `has_and_belongs_to_many` 的同時,必須準備一個 join table。 以 Developer 和 Project 兩個 model 為例,則 table 就叫做 `developer_project`,前後順序是以 String 的 `<` operator 比較得來。 設定時也可以指定 `:join_table`。 ## Reference * [ActiveRecord::Associations::ClassMethods](http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_and_belongs_to_many)
belongs_to or has_one?
兩者都是 1-1 關係,差別只在 foreign key 放在哪個 table。 若 User `belong_to` Account,則 users table 裡會有 `account_id` 這個欄位。 ## Reference * [ActiveRecord::Associations::ClassMethods](http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html)

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Remove all installed gems
Just fire this line of commands: gem list | cut -d" " -f1 | xargs gem uninstall -aIx ## Reference * [Painlessly Remove All Ruby Gems :: Geekystuff dot Net](http://geekystuff.net/2009/01/14/remove-all-ruby-gems/)
View local man pages
To view local man pages, give man a full or relative path, e.g.: man ./nginx.8 ## Reference * [Craic Computing Tech Tips: Viewing local man pages](http://craiccomputing.blogspot.com/2007/01/viewing-local-man-pages.html)