Skip to content

Instantly share code, notes, and snippets.

View orweinberger's full-sized avatar

Or Weinberger orweinberger

View GitHub Profile
@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
@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 / gist:abec5dcf96a474fc391e
Created May 15, 2014 15:58
Get the numerical permission mode for a file/folder
stat -c "%a %n" <PATH>
.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='...')
doctype html
html
head
meta(charset="utf-8")
meta(name="viewport", content="width=device-width, initial-scale=1")
meta(name="description", content="")
meta(name="author", content="")
link(rel="shortcut icon", href="ico/favicon.ico")
title #{pageTitle}
link(href="css/bootstrap.min.css", rel="stylesheet")
/*------------------------------------------------------------------
Project: Paperclip
Author: Yevgeny S.
URL: https://twitter.com/YevSim
Version: 1.0
Created: 11/03/2014
Last change: 01/04/2014
-------------------------------------------------------------------*/
/*! normalize.css v3.0.0 | MIT License | git.io/normalize */
html {
@orweinberger
orweinberger / default.conf
Last active August 29, 2015 14:01
nginx config
server {
listen 80;
server_name example.com www.example.com;
access_log /var/log/nginx/example.access.log;
rewrite ^ https://$server_name$request_uri? permanent;
location / {
proxy_pass http://127.0.0.1:8080/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
@orweinberger
orweinberger / keybase.md
Created September 23, 2014 12:39
keybase.md

Keybase proof

I hereby claim:

  • I am orweinberger on github.
  • I am orweinberger (https://keybase.io/orweinberger) on keybase.
  • I have a public key whose fingerprint is BAE5 9C9A AA7B A487 F99D 19EC AFE2 5EC6 4146 9280

To claim this, I am signing this object:

var insight = require('insight-api');