Skip to content

Instantly share code, notes, and snippets.

View lucassmacedo's full-sized avatar
🎯
Focusing

Lucas Macedo lucassmacedo

🎯
Focusing
View GitHub Profile
@rogeriochaves
rogeriochaves / links.md
Last active July 14, 2022 01:55
Pt-BR Data Science Links Scrapping
// 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 = {}
@rafrancoso
rafrancoso / install_environment.sh
Created October 10, 2017 21:46
Configure Debian\Mint\Ubuntu Apache PHP7.1 Mysql and Oracle Client environment
#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
@flyingluscas
flyingluscas / ShellFunctions.md
Last active November 20, 2019 21:25
Shell functions to run things like NPM, Composer and PHP using Docker.

Shell functions to run things using Docker.

Versions

Control the versions using environment variables, put this in your .bashrc or .zshrc.

PHP_VERSION=7.1
NODE_VERSION=8.0
#! /bin/bash
user=manolis
backups=/home/manolis/backups
if [[ $EUID > 0 ]]
then echo "Please run as root"
exit
fi
@learncodeacademy
learncodeacademy / flightplan-deploy.md
Last active January 7, 2024 11:58
Deploy Node.js Apps with Flightplan

##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
@silasrm
silasrm / phpstorm-vs-sublimetext-shortcuts.md
Last active April 23, 2024 20:05
Teclas de atalhos do PHPStorm com funções semelhantes ao Sublime Text, e outras interessantes.

#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
@jgoux
jgoux / app.js
Created April 15, 2014 14:53
Ionic / AngularJS service wrapper for Web SQL API / SQLite-Cordova-Plugin
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers'])
.run(function(DB) {
DB.init();
});