Skip to content

Instantly share code, notes, and snippets.

View cristopher-rodrigues's full-sized avatar
🏠
Working from home

Cristopher Rodrigues cristopher-rodrigues

🏠
Working from home
View GitHub Profile

Edit your run configurations

Edit your run configurations

Apply test scope directory and Use alternative configuration file

Apply test scope directory and Use alternative configuration file

Add new and choose remote interpreter

Add new and choose a remote interpreter

Select apply remote

Select apply remote

Add new and choose remote

Add new and choose remote

@cristopher-rodrigues
cristopher-rodrigues / a.markdown
Last active August 30, 2016 22:01
r install macos

R

brew tap homebrew/science
brew install Caskroom/cask/xquartz
brew install r
#!/usr/bin/env bash
defaults write com.apple.finder AppleShowAllFiles YES; # show hidden files
defaults write com.apple.dock persistent-apps -array; # remove icons in Dock
defaults write com.apple.dock tilesize -int 36; # smaller icon sizes in Dock
defaults write com.apple.dock autohide -bool true; # turn Dock auto-hidng on
defaults write com.apple.dock autohide-delay -float 0; # remove Dock show delay
defaults write com.apple.dock autohide-time-modifier -float 0; # remove Dock show delay
defaults write com.apple.dock orientation right; # place Dock on the right side of screen
defaults write NSGlobalDomain AppleShowAllExtensions -bool true; # show all file extensions
@cristopher-rodrigues
cristopher-rodrigues / gist:b9bce06034c2336957ffd2f0e3001199
Last active February 7, 2017 02:00
promisse callback hells each
// test here: http://jsfiddle.net/6fjzyes5/
const Bluebird = Promise.noConflict()
let merchant = {};
let customer = {};
let payment = {};
let MerchantPromise = function () {
return new Promise(function (resolve, reject) {
setTimeout(function () {
@cristopher-rodrigues
cristopher-rodrigues / a.md
Last active February 7, 2017 01:58
update node on mac
npm install -g n
npm cache clean -f
sudo n stable
@cristopher-rodrigues
cristopher-rodrigues / ansible.cfg
Last active February 7, 2017 02:01
config file ansible extension time enabled
# /etc/ansible/ansible.cfg
#
# config file for ansible -- http://ansible.com/
# ==============================================
# nearly all parameters can be overridden in ansible-playbook
# or with command line flags. ansible will read ANSIBLE_CONFIG,
# ansible.cfg in the current working directory, .ansible.cfg in
# the home directory or /etc/ansible/ansible.cfg, whichever it
# finds first
@cristopher-rodrigues
cristopher-rodrigues / a.bash
Last active February 16, 2017 18:18
gist todo
PROJECT=$([ "$PROJECT" ] && echo "$PROJECT" || echo "Projects")
PROJECT_DIR=$([ "$PROJECT_DIR" ] && echo "$PROJECT_DIR" || echo "/var/www/")
PROJECT_PATH=$([ "$PROJECT_PATH" ] && echo "$PROJECT_PATH" || echo "glados")
TMP_FILE=/tmp/TODO
touch $TMP_FILE
files="$(find -L "$PROJECT_DIR/$PROJECT_PATH" -not -path "$PROJECT_DIR/$PROJECT_PATH/node_modules/*" -type f -name "*.js")"
echo "$files" | while read file; do
GIT_URL="https://github.com/ebanx/$PROJECT/blob/master/$(echo $file | grep -o $PROJECT_PATH'.*')"
@cristopher-rodrigues
cristopher-rodrigues / a.md
Created March 22, 2017 15:16
CloudFormation

http://docs.aws.amazon.com/pt_br/AWSCloudFormation/latest/UserGuide/GettingStarted.Walkthrough.html http://docs.aws.amazon.com/pt_br/AWSCloudFormation/latest/UserGuide/quickref-general.html

A template is a JSON or YAML text file that contains the configuration information about the AWS resources you want to create in the stack. For this walkthrough, the sample template includes six top-level sections: AWSTemplateFormatVersion, Description, Parameters, Mappings, Resources, and Outputs; however, only the Resources section is required.

RESOURCES: The Resources section contains the definitions of the AWS resources you want to create with the template.

PARAMETERS: You use the Parameters section to declare values that can be passed to the template when you create the stack. A parameter is an effective way to specify sensitive information, such as user names and passwords, that you don't want to store in the template itself.

echo 'alias myip="curl ipecho.net/plain ; echo"' >> ~/.zshrc && source ~/.zshrc