Skip to content

Instantly share code, notes, and snippets.

View mschultheiss83's full-sized avatar

Martin Schultheiß mschultheiss83

View GitHub Profile
@mschultheiss83
mschultheiss83 / spConfigIndex.js
Created July 5, 2017 16:38 — forked from corpsefilth/spConfigIndex.js
configurable swatches magento 1.9.1, make first option selected by default -- BETA -- not for production, you will need to make slight mods.
function fireEvent(element,event)
{
if (document.createEventObject)
{
// dispatch for IE
var evt = document.createEventObject();
return element.fireEvent('on'+event,evt);
}
else
{
@mschultheiss83
mschultheiss83 / curl.md
Created May 25, 2017 22:22 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

'use strict';
require('require');
require('prototype_creep_startup_tasks');
require('prototype_creep_move');
require('prototype_roomPosition');
require('prototype_room_init');
require('prototype_room_costmatrix');
require('visualizer');
require('screepsplus');
// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
@mschultheiss83
mschultheiss83 / CasperJS-PhantomJs
Created March 1, 2016 18:33 — forked from raging/CasperJS-PhantomJs
My personal linux setup preferences
https://github.com/marten-cz/casperjs-deb --
sudo add-apt-repository ppa:martin.malek/testing && sudo apt-get update && sudo apt-get install casperjs
tep 1: Installing PhantomJS
- Download the latest source
wget http://phantomjs.googlecode.com/files/phantomjs-1.8.2-linux-x86_64.tar.bz2
@mschultheiss83
mschultheiss83 / jQuery.user.js
Last active February 22, 2016 19:48
jQuery and Greasemonkey
// ==UserScript==
// @name jQuery
// @namespace ipms
// @description Play nicely with jQuery and Greasemonkey
// @include http://geizhals.de/*
// @include http://*.amazon.*/*
// @version 1
// @grant none
// ==/UserScript==
var $;
@mschultheiss83
mschultheiss83 / 01-jquery.tripuls.functions.js
Created January 30, 2016 13:24
custom jquery expr and fn extend functions
/**
* Created by m.schultheiss on 16.11.2015.
*/
// Add this code anywhere you want (after jQuery has been loaded).
// Edit it to add your own expressions.
(function ($) {
'use strict';
function containsI(elem, text) {
return (
@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) {