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
| start() { | |
| cd ~/development/railsapps/$1 | |
| osascript -e "tell application \"Terminal\"" \ | |
| -e "do script \"clear; | |
| bin/rails server\" in front window" \ | |
| -e "tell application \"System Events\" to keystroke \"t\" using {command down}" \ | |
| -e "do script \"cd ~/development/railsapps/$1; | |
| mate .; | |
| clear\" in front window" \ |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="https://code.jquery.com/jquery-1.11.1.min.js"></script> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| adsfadsfsdfa | |
| <script id="jsbin-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
| require 'spec_helper' | |
| describe CampaignsController do | |
| let(:user){ create(:admin_user) } | |
| before(:each) do | |
| sign_in user | |
| end | |
| describe "GET #index" do |
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 id = ($this.attr("id").match(/\d+$/)); |
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 ready = function() { | |
| meetingsGeneral(); | |
| noteSubmitting(); | |
| noteKindSwitch(); | |
| noteDatepicker(); | |
| notes_visibility(); | |
| noteGeneral(); | |
| } | |
| // Call for jQuery (document).ready functions with full HTTP & Turbolinks requests |
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
| def authenticate | |
| authenticate_or_request_with_http_basic do |username, password| | |
| username == "username" && password == "password" | |
| end | |
| end |
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
| $('.container').on('focusout', '.form', function() { // binds function to all forms in a specified container | |
| var elem = $(this); | |
| setTimeout(function() { | |
| if( elem.find(':focus').length == 0 ) { // submits form only if there's no focus in any of the form input fields | |
| elem.submit(); | |
| } | |
| }, 200); // timeout of 200 ms to give browser time to register whether focus moved to another input in the same form |