Skip to content

Instantly share code, notes, and snippets.

View lefte's full-sized avatar
🎛️
Deploying CURT OrderHub

Erik Hanson lefte

🎛️
Deploying CURT OrderHub
View GitHub Profile
@lefte
lefte / magento-devdocs-fixer.user.js
Last active December 8, 2022 17:13
Magento DevDocs Fixer Greasemoney/Tampermonkey Script
// ==UserScript==
// @name Magento DevDocs Fixer
// @author Erik Hanson (erik.hanson@gmail.com)
// @version 1.3.0
// @namespace https://gist.github.com/lefte/af9232932eb95bcda269db9a94c190ac
// @updateURL https://gist.github.com/lefte/af9232932eb95bcda269db9a94c190ac
// @grant none
// @run-at document-idle
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js
// @description Allows one to browse the Magento DevDocs without the annoying opacity filter
@lefte
lefte / magento-anonymize-customer-data.sql
Last active September 24, 2021 21:03
Magento Anonymize Customer Data
-- Anonymize Magento company admins
select CONCAT_WS('', 'UPDATE customer_entity AS cu LEFT OUTER JOIN company AS co ON (cu.entity_id = co.super_user_id) SET cu.firstname = ''WS', co.erp_customer_id, ''', cu.lastname = ''', LEFT(REPLACE(REPLACE(REPLACE(co.company_name, ' ', ''), '&', ''), '''', ''), 14), ''', cu.email = ''Customer', co.erp_customer_id, '@qa.curtgroup.com'', cu.password_hash = ''generatedpasswordhash:salty1:1'', co.company_email = cu.email WHERE cu.entity_id = ', cu.entity_id, ';') AS newEmail
-- , '--cu--' as labelcu, cu.*, '--co--' as labelco, co.*
from company AS co
left outer join customer_entity AS cu ON (cu.entity_id = co.super_user_id) where cu.email not like '%@curtgroup.com';
-- Anonymize Magento company sub-users
select CONCAT_WS('', 'UPDATE customer_entity SET firstname = ''WS', co.erp_customer_id, ''', lastname = ''', LEFT(REPLACE(REPLACE(REPLACE(co.company_name, ' ', ''), '&', ''), '''', ''), 14), ''', email = ''SubUser', co.erp_customer_id, '-', cu.entity_id, '@qa.curtgroup.com'
@lefte
lefte / yoda-clipart-960x720.png
Last active November 21, 2019 20:29
Yoda Clipart (960x720)
yoda-clipart-960x720.png
@lefte
lefte / jira-icon-medium.png
Last active February 5, 2019 23:44
Jira Icon Medium Priority
jira-icon-medium.png
@lefte
lefte / chocolog-vnc-viewer-20190123.log
Created January 23, 2019 13:17
Chocolatey Upgrade Error Log - Vnc-viewer 2019-01-23
You have vnc-viewer v6.18.907 installed. Version 6.19.107 is available based on your source(s).
2019-01-23 06:55:24,973 7536 [DEBUG] - Backing up existing vnc-viewer prior to operation.
2019-01-23 06:55:24,974 7536 [DEBUG] - Moving 'C:\ProgramData\chocolatey\lib\vnc-viewer'
to 'C:\ProgramData\chocolatey\lib-bkp\vnc-viewer'
2019-01-23 06:55:26,980 7536 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey\lib\vnc-viewer".
2019-01-23 06:55:26,982 7536 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\lib-bkp\vnc-viewer\vnc-viewer.nupkg"
to "C:\ProgramData\chocolatey\lib\vnc-viewer\vnc-viewer.nupkg".
2019-01-23 06:55:26,985 7536 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\lib-bkp\vnc-viewer\vnc-viewer.nuspec"
to "C:\ProgramData\chocolatey\lib\vnc-viewer\vnc-viewer.nuspec".
2019-01-23 06:55:26,989 7536 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey\lib\vnc-viewer\tools".
@lefte
lefte / bluejeans-future-meeting-canceler.user.js
Last active December 21, 2018 19:25
BlueJeans Future Meeting Canceler
// ==UserScript==
// @name BlueJeans Future Meeting Canceler
// @author Erik Hanson (erik.hanson@gmail.com)
// @version 1.0
// @namespace https://gists.github.com/lefte/978f3be2dc0297f34153fa9cca685876
// @grant none
// @run-at document-idle
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// @description Adds a "cancel meeting" link to every meeting, otherwise BlueJeans only allows you to cancel today's meetings, so you can't cancel future events
// @match https://*.bluejeans.com/scheduling/*
@lefte
lefte / icons8-poison-windows10-100.png
Last active November 2, 2018 18:35
Icon Poison (Windows 10)
icons8-poison-windows10-100.png
@lefte
lefte / icons8-info-480.png
Last active October 17, 2018 16:03
Icon Info
icons8-info-480.png
@lefte
lefte / slack-ifttt-autostatus.md
Created February 3, 2018 04:46 — forked from gryte/slack-ifttt-autostatus.md
Slack IFTTT Automatically Update Status

enter an area - arrive at work - in the office

If Location, then Webhooks

webhooks field webhooks value
URL https://slack.com/api/users.profile.set
Method POST
Content Type application/x-www-form-urlencoded
Body authorization=Basic &token=TOKENHERE&profile={"status_text": "in the office","status_emoji":":office:"}
@lefte
lefte / chocolateyinstall.ps1
Created January 27, 2018 04:36
Chocolatey HeidiSQL 9.5.0.5196 Install PS1
$ErrorActionPreference = 'Stop';
$packageName= 'HeidiSQL'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url = 'https://www.heidisql.com/installers/HeidiSQL_9.5.0.5196_Setup.exe'
$packageArgs = @{
packageName = $packageName
unzipLocation = $toolsDir
fileType = 'exe'