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
@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 () {
#!/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 / 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

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

  1. Open ruby mine and on menu: tools => Create command line luncher =>

  2. on bash run:

bundle exec mine .

OLD

Download phpunit

wget https://phar.phpunit.de/phpunit-old.phar

Permittion to phpunit

chmod +x phpunit-old.phar

Move phpunit to bin sys

@cristopher-rodrigues
cristopher-rodrigues / bar.java
Created August 4, 2016 18:33
Generic Stack Spring
// BaseEntity
public abstract class BaseEntity<ID extends Serializable>
extends AbstractPersistable<ID>{
private static final long serialVersionUID = 1L;
@Override
public String toString(){
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
}
@cristopher-rodrigues
cristopher-rodrigues / foo.java
Created August 4, 2016 18:24
Spring boot app context
// AppContext
@Configuration
@EnableAutoConfiguration
@ComponentScan(basePackages={"ebanx?"})
public class AppContext {
}
// Application
@SpringBootApplication
public class Application {
@cristopher-rodrigues
cristopher-rodrigues / gist:3b20aa34143c94302924213aa2b98122
Last active February 7, 2017 02:13
mongo verify replicaset connect

on broker server:

telnet ipReplica port: tenet 101.101.01.01 27017

on replica:

ufw status