Skip to content

Instantly share code, notes, and snippets.

View mschultheiss83's full-sized avatar

Martin Schultheiß mschultheiss83

View GitHub Profile
@mschultheiss83
mschultheiss83 / knex-restify-midleware.js
Created January 29, 2016 22:11
a middleware file for restify to use knex as database connection
/**
* Created by m.schultheiss on 29.01.2016.
* References:
* - http://restify.com/
* - http://knexjs.org/
* Helpers:
* - https://github.com/trentm/node-bunyan
* - https://lodash.com
*/
@mschultheiss83
mschultheiss83 / .gitignore
Created January 12, 2016 11:14 — forked from karmi/.gitignore
Example Nginx configurations for Elasticsearch
nginx/
!nginx/.gitkeep
!nginx/logs/.gitkeep
src/
tmp/
var empty_list = function(selector) {
return selector(undefined, undefined, true);
};
var prepend = function(el, list) {
return function(selector) {
return selector(el, list, false);
};
};
var head = function(list) {
@mschultheiss83
mschultheiss83 / dump.vim
Last active August 29, 2015 14:23 — forked from mattn/dump.vim
scriptencoding utf-8
let s:calendar_list = [
\ ['Australian Holidays', 'en.australian#[email protected]'],
\ ['Austrian Holidays', 'en.austrian#[email protected]'],
\ ['Brazilian Holidays', 'en.brazilian#[email protected]'],
\ ['Canadian Holidays', 'en.canadian#[email protected]'],
\ ['China Holidays', 'en.china#[email protected]'],
\ ['Christian Holidays', 'en.christian#[email protected]'],
\ ['Danish Holidays', 'en.danish#[email protected]'],
@mschultheiss83
mschultheiss83 / GoogleApi.md
Created April 29, 2015 16:41
Google Api - a developer Links List
var myFunc = require("./myFunc");
(function bar(){
myFunc("bar message");
})();
var clipRects = this.getElementsBounds('.list_item img.poster');
var i = 0;
clipRects.forEach(function(clipRect) {
casper.capture(i+'.png', clipRect);
i++;
});
var links = [];
var quotes = [];
var tempUrl = [];
var infos = [];
var maxLinks = 10;
var firstUrl = 'http://www.imdb.com/search/title?at=0&num_votes=5000,&sort=user_rating,desc&start=1&title_type=tv_infoss';
var newUrl;
var x = require('casper').selectXPath;
/**
* @author Mickaël Andrieu <[email protected]>
* @licence MIT
* Usage: casperjs casperPDF.js "[url]" [filename.<format>]
*/
var casper = require('casper').create({
pageSettings: {
paperSize: {
format: "Letter",