| 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 |
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
| # Create directory for new site | |
| cd ~/Sites | |
| mkdir {query} | |
| cd {query} | |
| # Download latest version of WordPress | |
| wp core download | |
| # Setup wp-config file with WP_DEBUG enabled | |
| wp core config --dbname={query} --dbuser=root --dbpass=root --dbprefix={query}wp_ --extra-php <<PHP |
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
| #!/usr/bin/env ruby | |
| require 'mail' | |
| mysql_username = 'root' | |
| mysql_password = '123456' | |
| mysql_database = 'test' | |
| system("mysqldump --user=#{mysql_username} --password=#{mysql_password} #{mysql_database} > backup.sql") | |
| # Credit to : |
Other people's projects:
- https://github.com/laracasts/URL-Shortener URL Shortener by Jeffrey Way
- https://github.com/basco-johnkevin/laravelsnippets Source code of http://laravelsnippets.com website
- https://github.com/jesseterry/FusionInvoice FusionInvoice is built for freelancers and small businesses who need a simple, yet powerful self-hosted web based invoicing system.
- https://github.com/ezynda3/burnmsg is a self-destructing encrypted message app. A demo is also running on https://burnmsg.com
- https://github.com/martindilling/auto-generating-gallery the demo is at http://gallerydemo.martindilling.com/
My projects (tutorials are on my blog at http://maxoffsky.com):
- https://github.com/CodepadME/laravel-tricks - Source of Laravel-tricks.com
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
| # Simple environment setup script | |
| # Install Applications | |
| choco install fiddler4 | |
| choco install notepadplusplus | |
| choco install visualstudiocode | |
| choco install greenshot | |
| choco install GoogleChrome | |
| choco install putty | |
| choco install ccleaner |
When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.
-
Raw Attribute Strings
<div my-directive="some string" another-param="another string"></div>
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
| controllers.controller('MainCtrl', function($scope, $location, Facebook, $rootScope, $http, $location, Upload, Auth, User, Question, Category, Serie, Record, Location, Popup, Process, Card, Question) { | |
| $scope.$on('authLoaded', function() { | |
| $scope.isExpert($scope.main.serieId); | |
| $scope.isMember($scope.main.serieId); | |
| }); | |
| $scope.loadAuth = function() { | |
| Auth.load().success(function(data) { | |
| $scope.main.user = data.user; | |
| $scope.$broadcast("authLoaded"); |
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
| /** | |
| Uploading files | |
| Taken from: http://mikejolley.com/2012/12/using-the-new-wordpress-3-5-media-uploader-in-plugins/ | |
| INSTRUCTIONS: | |
| In the page you wish to use this script you'll need to enque the media scripts and this script. | |
| Then create a input box and a button with NOTHING in between.. with the class 'upload_image_button' | |
| <?php | |
| wp_enqueue_media(); |
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
| #### Example SSH config file | |
| # Host = a list of domains, IPs and personalized aliases that use this config | |
| # entry. These alias names follow "Host" and are space delimited. | |
| # e.g. Host 192.168.1.1 example.com example1 myalias1 | |
| # Hostname = the IP or real hostname | |
| # e.g. Hostname 192.168.1.1 | |
| # User = the username | |
| # e.g. User jdoe | |
| # Port = if this is a non standard port, i.e. not 22 |