Skip to content

Instantly share code, notes, and snippets.

View intel352's full-sized avatar

Jonathan Langevin intel352

View GitHub Profile
@intel352
intel352 / docker-compose.yaml
Created May 25, 2022 14:59
QNAP portainerCE docker-compose
version: '3'
services:
portainer:
image: portainer/portainer-ce:latest
container_name: portainer
restart: unless-stopped
security_opt:
- no-new-privileges:true
volumes:
@intel352
intel352 / ampscript-cheetsheet.txt
Created June 7, 2017 02:00
Dave's AMPScript cheat sheet
// Dave's AMPScript cheat sheet.
// AMPScript is ExactTarget (SFDC Marketing Cloud)'s server side scripting language.
// It's a bit of a pig, plus the docs are numerous and the examples aren't contextual.
// This assumes you don't need hand holding, and just need to get your head around it.
// It's also my reference for the snippets I use all the time (I'm a formatting stickler).
// These examples come from microsites I've written - adapt 'em for use elsewhere.
// Multi line AMPScript %%[contained within delimiters]%% gets interpreted on the server.
// Single line AMPScript %%=can use this style syntax=%% if you want.
// Assign URL key/value pairs to @someVar, eg: et.company.com/form?country=AU&bu=MP
set @countryCode = queryParameter("country")
@intel352
intel352 / run-in-console.js
Created May 22, 2017 19:31
Filter wizardofodds online casino list by 5-star, wizard seal, US friendly.
// For use on https://wizardofodds.com/online-gambling/all-casinos/
// Copy the below javascript, paste into JS console on the above page, execute.
$('div#all_casinos_area table.data td').filter(
function(index){
if ( (index%5) === 1) {
var el = $(this).find('span.filled-stars');
var width = el.width();
var parentWidth = el.offsetParent().width();
var percentWidth = 100*width/parentWidth;
if (percentWidth <= 90) {
@intel352
intel352 / run-in-console.js
Created May 22, 2017 19:30
Filter wizardofodds online casino list by 5-star, wizard seal, US friendly.
// For use on https://wizardofodds.com/online-gambling/all-casinos/
$('div#all_casinos_area table.data td').filter(
function(index){
if ( (index%5) === 1) {
var el = $(this).find('span.filled-stars');
var width = el.width();
var parentWidth = el.offsetParent().width();
var percentWidth = 100*width/parentWidth;
if (percentWidth <= 90) {
// remove low ranked

dwupload

Upload a storefront cartridge to a Demandware WebDAV server from command line.

Installation

:; npm install -g bitbucket:demandware/dwupload

Instead of installing this as a global npm package, you can install it locally and access it as ./node_modules/.bin/dwupload.

@intel352
intel352 / Jenkinsfile.groovy
Created May 26, 2016 16:51
Demandware Jenkinsfile build
node {
stage 'Checkout'
checkout scm
env.BUILD_TAG_CLEANED = "${env.BUILD_TAG}".replaceAll(/\%\d[a-zA-Z]/, "-").replaceAll(/[^\w-]+/, "")
env.ENABLE_TWO_FACTOR = 'false'
env.ENVIRONMENT_INSTANCE = 'dev03' // test build sandbox for branches != develop
if (env.BRANCH_NAME == 'develop') {
@intel352
intel352 / master-variant.xml
Created May 25, 2016 15:50
Sample master/variant product DWRE
<?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="http://www.demandware.com/xml/impex/catalog/2006-10-31" catalog-id="apparel-catalog">
<product product-id="25696717">
<ean/>
<upc/>
<unit/>
<min-order-quantity>1</min-order-quantity>
<step-quantity>1</step-quantity>
<display-name xml:lang="x-default">Floral Black and White Dress.</display-name>
<display-name xml:lang="fr-FR">Robe fleurie noir et blanc</display-name>
ChangeLog of JSch
====================================================================
Last modified: Fri Jun 5 03:22:57 UTC 2015
Changes since version 0.1.52:
- bugfix: the rekey initiated by the remote may crash the session.
- change: Logjam: use ecdh-sha2-nistp* if available,
ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
diffie-hellman-group14-sha1,
@intel352
intel352 / PostalCode.ds
Created August 22, 2014 15:11
Postal code validation
importPackage( dw.system );
importScript("utils/Underscore.ds");
var _ = getUnderscore();
function PostalCode() {}
(function(){
// Sourced from http://unicode.org/cldr/trac/browser/tags/release-24/common/supplemental/postalCodeData.xml
PostalCode.patterns = [
@intel352
intel352 / gist:32b8e12c6af704f08446
Created August 2, 2014 20:02
DS4 won't connect to DS4Tool
2014-08-02T19:56:55.4764311Z> Operating System: Microsoft Windows 8.1 Pro x64
2014-08-02T19:56:55.4774312Z> Locale: en-US
2014-08-02T19:56:55.8584521Z> IE version: 11.0.9600.17207
2014-08-02T19:56:55.8644525Z> Browser emulation set for 11
Language change to: en-US
(Default)
en-US
2014-08-02T19:56:56.0054598Z> Loading profile using method 5
2014-08-02T19:56:56.0144611Z> Loading profile using method 5
2014-08-02T19:56:56.0404668Z> Loading profile using method 5