Skip to content

Instantly share code, notes, and snippets.

View DoomyTheFroomy's full-sized avatar
👀
Looking forward

Martin Rudolph DoomyTheFroomy

👀
Looking forward
View GitHub Profile
@DoomyTheFroomy
DoomyTheFroomy / README.md
Created July 18, 2012 08:36
CouchDB crashing on aws micro instances

CouchDB is crashing on aws micro instances

When does it happend?

When a large view is requested (many data) or the database is requested to build all views and compact at the same time.

Why this happend?

The beam.smp couchdb process tries to start a new couchjs process which does not get any main memory.

How to fix it?

  1. Open the couchdb configuration
  2. set in Section 'query_server_config' the 'os_process_limit' to '1' (this is the maximum number I figured out for an aws micro instance)

Additions

@DoomyTheFroomy
DoomyTheFroomy / uri.js
Created September 6, 2012 19:35 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@DoomyTheFroomy
DoomyTheFroomy / README.md
Created October 10, 2012 07:26 — forked from ingoradatz/README.md
Turning an existing GitHub Issue into a Pull Request

Why?

This command attaches code (pull request) to an existing issue. This prevents:

  • creating a new issue when opening a new pull-request
  • splitting an on-growing discussion from an issue into an pull request issue

Usage?

You can use personal and organization github names and their branches.

git pull-request -i issue-number-without-the-# -b request-to-branch -h request-from-branch

@DoomyTheFroomy
DoomyTheFroomy / bootstrap_ipad_dropdown_fix
Created November 21, 2012 07:07
Bootstrap Dropdown iPad Temporary Fix
// Bootstrap dropdown fix
$('body')
.on('touchstart.dropdown', '.dropdown-menu', function (e) { e.stopPropagation(); })
.on('touchstart.dropdown', '.dropdown-submenu', function (e) {e.preventDefault();});
@DoomyTheFroomy
DoomyTheFroomy / gist:4123528
Created November 21, 2012 07:08 — forked from akolosov/gist:4123274
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@DoomyTheFroomy
DoomyTheFroomy / removeDocsFromCouchdb.js
Last active June 19, 2017 12:41 — forked from StephanU/removeDocsFromCouchdb.js
Using jquery couchdb plugin to delete docs from a database (1.6.1)
var targetDB = 'db'
var blacklist = ['_design/']
var ddoc = 'test'
var viewName = 'emittedDocsToBeDeleted'
var toBeDeletedDocs = {}
var skip = 0
var limit = 5000
var totalRows = 0
deleteDocuments(skip, limit)
@DoomyTheFroomy
DoomyTheFroomy / API.md
Last active December 21, 2015 13:46 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

URL

<The URL Structure (path only, no root url)>

Method:

return {
code : 301,
headers : {
"Location" : 'redicrect url'
}
};
@DoomyTheFroomy
DoomyTheFroomy / create_labels.sh
Last active October 5, 2016 06:41 — forked from omegahm/create_labels.sh
Create Gtihub labels from Bash
#!/usr/bin/env bash
# Colours picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/
###
# Label definitions
###
declare -A LABELS
# Platform