⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains 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
//global variable used for SHOP upload functionality var myView = null; var agentBrokerSAMLToken=null; var postCCRApplicantIDToken=null; var postCCRAppIDToken=null; var postCCRState=null; var agentEmailUUID =null; $(function($) { var tenantId = 'global'; var locale = 'en_US'; var resources = {}; var environment = ''; var envReference = 'Production'; resources['ffe.ee.shared.validation.required'] = '0 is required.'; resources['ffe.ee.shared.dropdown.relation.january'] = 'January'; resources['ffe.ee.shared.formValidator.eeChoose'] = 'Choose "individual," "SHOP," or "both."'; resources['ffe.ee.shared.dropdown.docType.immigrantVisa'] = 'Machine Readable Immigrant Visa (with Temporary I-551 Language)'; resources['ffe.ee.shared.nav.subNav.reviewAndConfirm'] = 'Review & Confirm'; resources['ffe.ee.shared.exceptions.400.403'] = 'Invalid XML Request'; resources['ffe.ee.shared.exceptions.400.401'] = 'Missing action URI'; resources['ffe.ee.shared.exceptions.400.400'] = 'Missing Taskname'; resources['ffe.ee.shared.label. |
This file contains 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
txtblk='\[\e[0;30m\]' # Black | |
txtred='\[\e[0;31m\]' # Red | |
txtgrn='\[\e[0;32m\]' # Green | |
txtylw='\[\e[0;33m\]' # Yellow | |
txtblu='\[\e[0;34m\]' # Blue | |
txtpur='\[\e[0;35m\]' # Purple | |
txtcyn='\[\e[0;36m\]' # Cyan | |
txtwht='\[\e[0;37m\]' # White | |
txtrst='\[\e[0m\]' # Text Reset |
This file contains 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 sh | |
# Title: Ruby development environment for OS X (Lion) | |
# Author: Rogelio J. Samour | |
# Warning: | |
# While it is unlikely any code below might damage your system, | |
# it’s always a good idea to back up everything that matters to you | |
# before running this script! Just in case. I am not responsible for | |
# anything that may result from running this script. Proceed at | |
# your own risk. |
This file contains 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
# just FYI, ApplicationRecord is a new rails 5 thing, | |
# It is a superclass for your models that inherit from ActiveRecord::Base | |
# It's purpose is to reduce the need for monkey patching ActiveRecord::Base directly | |
class Person < ApplicationRecord | |
belongs_to :account | |
end | |
class Account < ApplicationRecord | |
has_many :users |
This file contains 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
# put all new_layout views in the following new folder: app/views_new_layout | |
## Do NOT put the views in app/views | |
# you need a migration in Users called new_layout:boolean this does not need a default value | |
## The below code will assume the new layout for all users, unless they explicitly say no. | |
### for example, if you want to put an ajax box at the top of the new page that says | |
#### "This is our new layout. Switch back to old one? If they click the link, then it sets the boolean to false. | |
##### You can also have them switch back and forth easily. If they make no preference (thus the boolean is nil,) then new layout is used. | |
# You can reverse this logic very easily if you want to default to the old layout. | |
This file contains 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
$ pg_resetxlog /usr/local/var/postgres | |
pg_resetxlog: lock file "/usr/local/var/postgres/postmaster.pid" exists | |
Is a server running? If not, delete the lock file and try again. | |
$ rm /usr/local/var/postgres/postmaster.pid | |
$ pg_resetxlog /usr/local/var/postgres | |
The database server was not shut down cleanly. | |
Resetting the transaction log might cause data to be lost. | |
If you want to proceed anyway, use -f to force reset. | |
$ pg_resetxlog -f /usr/local/var/postgres | |
Transaction log reset |
This file contains 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
{ | |
"color_scheme": "Packages/User/Monokai Soda.tmTheme", | |
"draw_white_space": "selection", | |
"font_face": "Source Code Pro", | |
"font_size": 14.0, | |
"rulers": | |
[ | |
80 | |
], | |
"tab_size": 2, |
This file contains 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
class SomeClass | |
SOME_CONSTANT = 'upper case name' | |
def initialize(attributes) | |
@some_attribute = attributes[:some_attribute] | |
@another_attribute = attributes[:another_attribute] | |
@user_factory = attributes[:user_factory] | |
end | |
def method_with_arguments(argument_one, argument_two) |
This file contains 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
# case is a multi-way decision statement similar to if/elsif/else | |
# here's a bit longer and more thorough discussion: http://www.skorks.com/2009/08/how-a-ruby-case-statement-works-and-what-you-can-do-with-it/ | |
# a simple example of case | |
case title | |
when 'War and Peace' | |
puts 'Tolstoy' | |
when 'Romeo and Juliet' | |
puts 'Shakespeare' |
NewerOlder