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
1 Catchall for general errors let "var1 = 1/0" Miscellaneous errors, such as "divide by zero" and other impermissible operations | |
2 Misuse of shell builtins (according to Bash documentation) empty_function() {} Missing keyword or command, or permission problem (and diff return code on a failed binary file comparison). | |
126 Command invoked cannot execute /dev/null Permission problem or command is not an executable | |
127 "command not found" illegal_command Possible problem with $PATH or a typo | |
128 Invalid argument to exit exit 3.14159 exit takes only integer args in the range 0 - 255 (see first footnote) | |
128+n Fatal error signal "n" kill -9 $PPID of script $? returns 137 (128 + 9) | |
130 Script terminated by Control-C Ctl-C Control-C is fatal error signal 2, (130 = 128 + 2, see above) | |
255* Exit status out of range exit -1 exit takes only integer args in the range 0 - 255 |
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
sudo jboss_user | |
jbmgr status | |
jbmgr mdb <item> stop | |
- Stop mdb related to service | |
jbmgr restart <list> | |
- Restart list of services |
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
<?php | |
/** | |
Template Name: Archive | |
*/ | |
get_header(); ?> |
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
<?php | |
namespace glowingminds; | |
/** | |
* Simple wrapper for cURL page fetching | |
* @author Ingmar Boddington (https://github.com/IngmarBoddington | http://www.glowingminds.co.uk/) | |
* @author Barry Parkin (https://github.com/barryparkin | http://ba.rrypark.in) | |
* @version 1.1 | |
* | |
* ~ Improved security of https connections to prevent man-in-the-middle atacks. |
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
<?php | |
/** | |
* SessionHandler Class - Uses DB for session handling (for multiserver environment) | |
* | |
* @package glowingminds | |
* @author Ingmar Boddington | |
*/ | |
class SessionHandler { | |
const TABLENAME = 'sessions'; |
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
git flow init | |
- Sets up 'proper' branch structure for repo | |
git flow feature | |
- List feature branches | |
git flow feature start <name> | |
- Begin a new feature branch from develop and switch to it | |
git flow feature finish <name> |
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
Composer Install | |
================ | |
Download: curl -s https://getcomposer.org/installer | php | |
Install: mv composer.phar /usr/local/bin/composer | |
composer.json | |
============= | |
contains information of project dependencies | |
Example (Remember - no comments in json): |
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
php | |
- Start interactive session | |
php -f <filename> | |
- Run specified script from cli | |
php -i | |
- Show PHP info | |
php -m |
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
Principles: There's more than one way to do it! / do what I mean! | |
GENERAL | |
======= | |
use <string>; | |
- Pragmas, intepreted before script runs | |
- Use 'strict' and 'warnings' to enforce good syntax | |
- Also used to import libraries |
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
Template naming convention | |
<bundle>:<controller>:<template> | |
<bundle> translates to /src/BundleStart/BundleEnd/ (e.g. AcmeBlogBundle -> src/Acme/BlogBundle) | |
<controller> means template in /Resources/Views/<controller> | |
<template> is actual name of file in format <name>.<format>.<engine> e.g. index.html.php or smeg.xml.twig | |
::base.html.twig means template in application wide dir i.e. app/Resources/Views/ | |
{{ <variable> }} - Output value |