Skip to content

Instantly share code, notes, and snippets.

View orweinberger's full-sized avatar

Or Weinberger orweinberger

View GitHub Profile
.navbar.navbar-default.navbar-fixed-top(role='navigation')
.container
.navbar-header
button.navbar-toggle(type='button', data-toggle='collapse', data-target='.navbar-collapse')
span.sr-only Toggle navigation
span.icon-bar
span.icon-bar
span.icon-bar
a.navbar-brand(href='/')
img(src='https://joola.io/img/hero.png', alt='...')
@orweinberger
orweinberger / gist:abec5dcf96a474fc391e
Created May 15, 2014 15:58
Get the numerical permission mode for a file/folder
stat -c "%a %n" <PATH>
@orweinberger
orweinberger / gist:8764727
Created February 2, 2014 08:24
Mongo Sharding 101
Follow this manual:
http://docs.mongodb.org/manual/tutorial/deploy-shard-cluster/
The sharding structure requires:
1. 3 config servers
2. a minimum of 2 mongoS instances (the mongoS is the server that does the balancing between the different mongods)
3. 9(!) mongod instances, 3 'standalone' mongods and for each standalone there are 3 replica sets for redundancy.
4. You cannot play with the above structure, yes, you really need 9 mongods.
@orweinberger
orweinberger / x1-intel-display-centos6
Created November 17, 2013 19:55
How to fix graphics display on Lenovo X1 with CentOS 6.x
1. telint 3
2. mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
3. nano /etc/grub.conf # find and remove all mentions of 'nomodeset'
4. reboot