Skip to content

Instantly share code, notes, and snippets.

View gabskoro's full-sized avatar

Gabrijel Škoro gabskoro

View GitHub Profile
@demisx
demisx / angularjs-providers-explained.md
Last active May 17, 2024 03:38
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@DamirSvrtan
DamirSvrtan / app_template.rb
Last active August 29, 2015 14:05
Rails application generator template
### Rails app generator template. Run it:
### rails new _app_name_ -m https://gist.githubusercontent.com/DamirSvrtan/28a28e50d639b9445bbc/raw/app_template.rb
remove_file "README.rdoc"
create_file "README.md", "Development: run ./bin/setup"
run 'mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss'
database_type = ask("Do you want to use postgres or mysql?", limited_to: ["pg", "mysql"])
adapter = if database_type == 'pg'