Skip to content

Instantly share code, notes, and snippets.

View cvieth's full-sized avatar

Christoph Vieth cvieth

View GitHub Profile
@cvieth
cvieth / Shopify-Checkout-Hack.js
Last active May 20, 2023 09:51
Shopify Checkout Hack - This scipt helps to modify the Shopify Checkout Pages
/**
* Shopify Checkout Hack
*
* This scipt helps to modify the Shopify Checkout Pages. To run this script, add your
* code for each checkout step, compress your code with a tool of your choice and paste
* it to:
*
* Admin > General > Google Analytics > Additional Google Analytics Javascript
*
* @author Christoph Vieth <christoph@vieth.me>
# Colortheme for 'ls'
export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
# Tab Auto Completion
bind 'TAB:menu-complete'
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
@cvieth
cvieth / JS-GET
Last active December 14, 2015 05:29
Javascript GET Snippet
(function(){
var s = window.location.search.substring(1).split('&');
if(!s.length) return;
window.$_GET = {};
for(var i = 0; i < s.length; i++) {
var parts = s[i].split('=');
window.$_GET[unescape(parts[0])] = unescape(parts[1]);
}
}())
@cvieth
cvieth / content
Last active December 13, 2015 19:09
Danone Cashback Export Tool
<?PHP
error_reporting(0);
ini_set('display_errors', 0);
set_time_limit(0);
ignore_user_abort(true);
require_once '../lib/dbObject.php';
$sql = "SELECT
<?php
include 'lib/promoCashback.php';
$data = array();
$data['locale'] = "ch_de";
$data['code'] = "22277AWR7";
$data['check_price'] = "0";
$data['place'] = "Test";
$data['gender'] = "m";
$query = $dbObject->prepare("INSERT INTO `promo_actimel-ch_data`
(
`locale`,
`code`,
`price`,
`check_price`,
`place`,
`gender`,
`surname`,
`lastname`,
<?php
include_once 'lib/httpHeader.php';
// HTTP Header ausgeben
header(httpHeader::STATUS_200);
header(httpHeader::ENCODING_UTF8);
header(httpHeader::CONTENT_TYPE_HTML);
function echoValue($name) {
global $tplData;