- Download https://spring.io/tools latests
- Rename the extracted bundle as "springsource"
- sudo mv springsource /opt
- sudo chown -R root:root /opt/springsource
- sudo chmod -R +r /opt/springsource
- sudo cp /opt/springsource/sts-3.8.2.RELEASE/icon.xpm /usr/share/pixmaps/sts.xpm [Your version can be different]
- sudo touch /usr/share/applications/sts.desktop<<EOF [Desktop Entry] Encoding=UTF-8 Name=Spring IDE
View IndexController.php
<?php | |
namespace App\Http\Controllers; | |
class InfoController extends Controller | |
{ | |
/* | |
* | |
* Checking if cache file exist | |
* @ param string $name cache file name |
View install.md
View GmailController.js
/** | |
* Admin/GmailController | |
* | |
* @description :: Server-side logic for managing admin/gmails | |
* @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers | |
Help Links: | |
https://github.com/mscdex/node-imap | |
https://github.com/pipedrive/inbox | |
https://github.com/google/google-api-nodejs-client |
View Install.md
#Steps to Install
- Download and Install ImageMagick http://imagemagick.org/script/binary-releases.php#windows
- Visit ImageMagic installation directory and module/coders copy all files and past on D:\xampp\apache\bin
- Download Binary https://pecl.php.net/package/imagick/3.4.0RC5/windows php 5.6 TS one according to phpinfo Architecture if it is x86/x64
- Exatract and copy php_imagick.dll to D:\xampp\php\ext
- Add php_imagick.dll on php.ini
- Copy 8 CORE_*.dll to D:\xampp\apache\bin
- Restart Apache
- done and visit phpinfo
View app.js
var aws_router = require('./routes/aws'); | |
app.use('/aws', aws_router); | |
//npm install aws-sdk | |
//visit http://localhost:3000/aws/table-list |
View upgrade-php7.sh
#!/usr/bin/env bash | |
# Upgrade an Amazon Linux EC2 to PHP 7.3 | |
# | |
# Last tested w/ PHP 7.2 AWS Linux version 2.8.5 | |
# | |
# Must be ran as sudo: | |
# sudo bash upgrade-php7.sh | |
# | |
# Can be added to ./.ebextensions/20_php.config like so: | |
# container_commands: |
View readme.md
- Visit https://aws.amazon.com/cli/ and install AWS CLI Client
- Visit https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-on-windows and install Kubernetes CLI Client
- Configure AWS CLI -
aws configure
AWS Access Key ID [None]: AKIAJXXXXXXEWDNXXXXX
AWS Secret Access Key [None]: 2EqCQXXXXXuK3LXXXXXtZXMGNXXXXXVCHd0XXXXX
Default region name [None]: eu-central-1
Default output format [None]: JSON
- Configure Amazon EKS (Elastic Kubernetes Service) -
aws eks --region eu-central-1 update-kubeconfig --name phpfarmer-kube1
View Artisan.md
// Added in 5.1.11:http://laravel.com/docs/5.1/authorization#creating-policies
php artisan make:policy PostPolicy
// Displays help for a given command
php artisan --help OR -h
// Do not output any message
php artisan --quiet OR -q
// Display this application version
php artisan --version OR -V
// Do not ask any interactive question
View readme.MD
- Always follow PSR2 - PSR4 php coding style, better install it on PHPStorm
- Always validate things via RequestValidators even if it is nullable(), Move validation from controllers to Request classes.
- Use child relationships to get child data and filter data
- Make sure if there is any auto generated codes like __construct
- How can a array count ever be less than 0? Check to use a simple condition instead of making it complex with double check
- Check if there is anything should actually fail if it doesn't have a set value
- It's a good idea to check first for the less costly conditions (especially inside a loop)
- Always use Carbon for date processing
- Maintain code commenting and proper docblock
- Always use custom env for static values, do not get data from the .env file directly
View install.md
composer create-project croogo/app croogoapp 3.0.x-dev
cd croogoapp
bin/cake Croogo/Install.install admin admin
bin/cake server
sudo chmod -R 0777 ./tmp/cache/queries/
sudo chmod -R 0777 ./tmp/cache/persistent/
NewerOlder