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.

// 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 / .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]'],
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++;
});