Source: http://www.syahzul.com/2016/04/06/how-to-install-oci8-on-ubuntu-14-04-and-php-5-6/
Last Message ID: 89569
Andrew M. Webb on Twitter |
---|
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
// place this file in __mocks__ | |
let pendingAssertions | |
exports.prompt = prompts => { | |
if (!pendingAssertions) { | |
throw new Error(`inquirer was mocked and used without pending assertions: ${prompts}`) | |
} | |
const answers = {} |
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
#MySql | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password 123' | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password 123' | |
apt-get install -y mysql-server | |
mysql -uroot -p123 -e "CREATE USER 'user'@'%' IDENTIFIED BY 'pass';" | |
mysql -uroot -p123 -e "GRANT ALL ON *.* TO 'user'@'%';" | |
#Allow external connection | |
#Mint/Ubuntu Version | |
#-sed -i "/^bind-address*/s/^/#/g" /etc/mysql/mysql.conf.d/mysqld.cnf |
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
#! /bin/bash | |
user=manolis | |
backups=/home/manolis/backups | |
if [[ $EUID > 0 ]] | |
then echo "Please run as root" | |
exit | |
fi |
##Setup your server (this would ideally be done with automated provisioning)
- add a deploy user with password-less ssh see this gist
- install forever
npm install -g forever
##Install flightplan
npm install -g flightplan
- in your project folder
npm install flightplan --save-dev
- create a flightplan.js file
#Teclas de atalhos do PHPStorm com funções semelhantes ao Sublime Text, e outras interessantes.
Sublime Text | PHPStorm | Função |
---|---|---|
CMD+P | CMD+Shift+O | Busca por arquivos no projeto |
CMD+R | CMD+F12 (1) | Lista os métodos da classe e outros símbolos |
CMD+F | CMD+F | Busca no arquivo |
CMD+Option+F | CMD+R | Busca e troca os valores no arquivo |
CMD+Shift+F | CMD+Shift+F | Busca, busca e troca e outros em um determinado caminho com várias regras. |
CMD+D (2) | Option+Up (2) | Seleciona palavra |
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
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers']) | |
.run(function(DB) { | |
DB.init(); | |
}); |
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 | |
/* | |
* Plugin: StreamlineFoundation | |
* | |
* Class: Schedule | |
* | |
* Description: Provides scheduling mechanics including creating a schedule, testing if a specific moment is part of the schedule, moving back | |
* and forth between scheduled moments in time and translating the created schedule back to a human readable form. | |
* | |
* Usage: ::fromCronString() creates a new Schedule class and requires a string in the cron ('* * * * *', $language) format. |
NewerOlder