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
| # 0 is too far from ` ;) | |
| set -g base-index 1 | |
| # Automatically set window title | |
| set-window-option -g automatic-rename on | |
| set-option -g set-titles on | |
| #set -g default-terminal screen-256color | |
| set -g status-keys vi | |
| set -g history-limit 10000 |
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
| function ns (namespase) { | |
| var parts = namespase.split('.'), | |
| parent, | |
| i; | |
| if ( window.hasOwnProperty(parts[0]) === false ) { | |
| window[parts[0]] = {}; | |
| } |
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 random = function(min, max) { | |
| return Math.floor(Math.random() * (max - min + 1)) + min; | |
| }; |
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
| $(document).mouseup(function (e) { | |
| var container = $("YOUR CONTAINER SELECTOR"); | |
| if (container.has(e.target).length === 0) | |
| { | |
| container.hide(); | |
| } | |
| }); |
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
| String.prototype.times = function(n) { | |
| return Array.prototype.join.call({length: n+1}, this); | |
| }; | |
| var star = '<div class="star" />'.times(12); | |
| $('body').append(star); |
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
| ActiveRecord::Base.connection.execute("SELECT * FROM users") | |
| ActiveRecord::Base.connection.execute("select * from customers").fetch_row | |
| results = ActiveRecord::Base.connection.execute("select * from customers") |