This is just stuff that I have put down that I find I use a lot of the time for my own reference.
$ git pull
/** | |
* Controller Class | |
* Contains Mappings and HTTP Methods | |
*/ | |
@RestController | |
public class TopicController { | |
@Autowired | |
private TopicService topicService; |
Note: Some of these shortcuts have been remapped for my own convenience (Preferences->Keymap). These are Mac shortcuts, just use the Windows/Linux equivalent of the Cmd/Option/Ctrl/Del keys.
####Search, Go to, Navigation ####
Cmd + P - Search file
Cmd + Shift + O - Search everywhere
(I swapped the above two recently because I use Cmd + P to search for files most of the time).
<?php namespace App\Services; | |
use App\User; | |
class AclPermitted | |
{ | |
public static function verify( $permission ) | |
{ | |
/** @var User $user */ | |
$user = app( 'auth' )->user(); |
Other people's projects:
My projects (tutorials are on my blog at http://maxoffsky.com):
<?php | |
use Aws\Common\Aws; | |
use Aws\S3\Exception\S3Exception; | |
// make sure the SDK is installed | |
// I've used Composer to autoload it: http://docs.aws.amazon.com/aws-sdk-php/guide/latest/installation.html | |
/* | |
* jQuery File Upload Plugin PHP Class 7.1.0 | |
* https://github.com/blueimp/jQuery-File-Upload |
/* Get the latitude and longitude from address: | |
Author : Bastin Robins J | |
*/ | |
// Add the link to webpage | |
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> | |
//Function to covert address to Latitude and Longitude | |
var getLocation = function(address) { | |
var geocoder = new google.maps.Geocoder(); |
<?php | |
################################################################################################### | |
# READING A VALUE FROM YOUR "DEFAULT" CREDENTIAL SET | |
CFCredentials::get()->key # my-key | |
CFCredentials::get()->secret # my-secret | |
CFCredentials::get()->default_cache_config # apc | |
CFCredentials::get()->certificate_authority # false | |
// This is exactly the same as specifying "@default"... |
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |