Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Breno Polanski brenopolanski

🏠
Working from home
Block or report user

Report or block brenopolanski

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@brenopolanski
brenopolanski / resize-map-leaflet.md
Created Aug 27, 2015
Resize and center map Leaflet
View resize-map-leaflet.md
map._onResize();
map.panTo(new Saiku.leaflet.LatLng(21.505, -0.09));
@brenopolanski
brenopolanski / install-couchdb.sh
Last active Aug 29, 2015
Installing CouchDB on Ubuntu
View install-couchdb.sh
# via
# http://wiki.apache.org/couchdb/Installing_on_Ubuntu
# Installing using an existing package
sudo apt-get install couchdb -y
### Troubleshooting
### If the aptitude/apt-get installation gives an error message then couchdb might not have access to its pid file.
### Fix:
sudo chown -R couchdb /var/run/couchdb
@brenopolanski
brenopolanski / install-atom-ubuntu(x64).md
Last active Aug 29, 2015
Installing Atom on Ubuntu (64bits) via PPA
View install-atom-ubuntu(x64).md

To install Atom in Ubuntu 14.04, 13.10 or 12.04 (64bits only!) and derivatives (Linux Mint, elementary OS, etc.), use the following commands:

$ [sudo] add-apt-repository ppa:webupd8team/atom
$ [sudo] apt-get update
$ [sudo] apt-get install atom

Before installing Atom, remember that it's still in beta so you may find bugs or missing / incomplete features!

View .jshintrc
{
"bitwise": true,
"eqeqeq": true,
"eqnull": true,
"immed": true,
"newcap": true,
"esnext": true,
"latedef": true,
"noarg": true,
"node": true,
@brenopolanski
brenopolanski / how-to-install-mongodb-on-ubuntu.md
Last active Aug 29, 2015
How To Install MongoDB On Ubuntu
View how-to-install-mongodb-on-ubuntu.md

Add GPG Key

10gen package required GPG key, imports it:

$ [sudo] apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

Add 10gen package to source.list.d

View install-gnome-shell.md

gnome-shell

GNOME 3 has been designed from the ground up to help you have the best possible computing experience.

Install the Gnome Shell in Ubuntu / Linux Mint (and elementary OS along with Ubuntu derivatives: Xubuntu, Kubuntu, etc.), use the following commands:

$ [sudo] apt-get update
$ [sudo] apt-get install gnome-shell
@brenopolanski
brenopolanski / loading-page.css
Created Aug 11, 2014
Effect of loading in page
View loading-page.css
#loading-page {
background: rgba(204,204,204,.8);
height: 100%;
width: 100%;
overflow: hidden;
position: fixed;
left: 0;
top: 0;
z-index: 99998;
}
View deleteObjectFunction.js
var obj = {
a: 'house',
b: function() {
console.log('Hi function');
},
c: 123456
}
deleteObjectFunction: function(obj) {
if (obj.length === undefined) {
View ClearFileInput.js
var inputFile = $("#control");
function something_happens() {
inputFile.replaceWith(inputFile.val('').clone(true));
};
@brenopolanski
brenopolanski / shell-comando-teste.md
Last active Aug 29, 2015
Shell - O comando test
View shell-comando-teste.md
Testes em variáveis
-lt Núm. é menor que (LessThan)
-gt Núm. é maior que (GreaterThan)
-le Núm. é menor igual (LessEqual)
-ge Núm. é maior igual (GreaterEqual)
-eq Núm. é igual (EQual)
-ne Núm. é diferente (NotEqual)
= String é igual
!= String é diferente
You can’t perform that action at this time.