Skip to content

Instantly share code, notes, and snippets.

View willianpinho's full-sized avatar

Willian Pinho willianpinho

  • Brazil
View GitHub Profile
@willianpinho
willianpinho / playground.rs
Created March 16, 2018 17:44 — forked from rust-play/playground.rs
Code shared from the Rust Playground
mod foo {
mod bar {
pub fn foobar() {
println!("hello");
}
}
}
fn main() {
foo::bar::foobar();
}
@willianpinho
willianpinho / gist:29e9c543bfd9b6530c318fe07eef9c3a
Created March 5, 2018 16:06 — forked from tamoyal/gist:10441108
Create super user and database user in Mongo 2.6
# Create your superuser
$ mongo
> use admin
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]})
> exit
# Alias for convenience (optional and at your own risk)
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile
$ source ~/.bash_profile