Based on this article
ALL INSTALLATIONS ASSUME YES WHEN PROMPTED, that's what -y does
This script can be copy paste to ssh as is. No hands installation. :-)
yum install zsh -y
ALL INSTALLATIONS ASSUME YES WHEN PROMPTED, that's what -y does
This script can be copy paste to ssh as is. No hands installation. :-)
yum install zsh -y
SHELL=/bin/bash | |
# to see all colors, run | |
# bash -c 'for c in {0..255}; do tput setaf $c; tput setaf $c | cat -v; echo =$c; done' | |
# the first 15 entries are the 8-bit colors | |
# define standard colors | |
ifneq (,$(findstring xterm,${TERM})) | |
BLACK := $(shell tput -Txterm setaf 0) | |
RED := $(shell tput -Txterm setaf 1) |
Usually when new version of Node.js comes out and you update it by just installing new and removing old one, all of your global NPM packages are gone. Here is how to update to new version of Node and reinstall packages:
$ nvm install NEW_VERSION --reinstall-packages-from=OLD_VERSION
rules: | |
# CRITICAL - SECURITY | |
# Projects must not depend on dependencies with known security issues | |
composer.security_issue_in_composer: | |
enabled: true | |
# Database queries should use parameter binding | |
doctrine.database_query_contains_string_and_variable_concatenation: | |
enabled: true | |
# PHP debug statements found | |
php.debug_statements: |
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; | |
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; | |
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL'; | |
CREATE SCHEMA IF NOT EXISTS `survey_001_models_from_tables` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ; | |
USE `survey_001_models_from_tables` ; | |
-- ----------------------------------------------------- | |
-- Table `survey_001_models_from_tables`.`organizations` | |
-- ----------------------------------------------------- |
The API we are creating in this gist will follow these rules :
password
Grant Type only (no need for Authorization pages and such).v1.api.example.com
)The API will be written in PHP with the Symfony 2 framework. The following SF2 bundles are used :
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |