This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install the latest wsl2 with systemd support | |
# https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/ | |
# Update the latest wsl | |
wsl --update --web-download | |
# Install Ubuntu with username vagrant | |
wsl --install -d Ubuntu-22.04 | |
# Set Ubuntu as default distro |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Text; | |
using System.Security.Cryptography; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
Console.WriteLine(GetSHA256Hash("secret")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright © 2017 Google Inc. | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-xxx']); | |
_gaq.push(['_trackPageview']); | |
(function() { | |
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | |
})(); | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Disable router dnsmasq and privoxy | |
Go to Setup and deactivate the DHCPD service | |
Go to Setup and disable DHCP Server and all dnsmasq options | |
Go to Service and disable all privoxy options | |
#Save startup script | |
/opt/etc/init.d/rc.unslung start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delete from ps_cart;delete from ps_cart_product;delete from ps_message;delete from ps_order_detail;delete from ps_order_history;delete from ps_orders; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT p.id_product AS 'ID', | |
p.active AS 'Active (0/1)', | |
pl.name AS 'Name', | |
p.id_category_default AS 'Default Category', | |
p.price AS 'Price tax excl.', | |
p.quantity AS 'Quantity', | |
pl.description_short AS 'Short description', | |
pl.description AS 'Description', | |
pl.link_rewrite AS 'URL rewritten', | |
p.available_for_order AS 'Available for order', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select distinct | |
# uncomment these rows for debugging | |
# p.ID, | |
# v.ID, | |
if( isnull(vm_sku.meta_value), pm_sku.meta_value, vm_sku.meta_value ) as 'sku', | |
p.post_title, | |
# need to cast prices to decimal because the datatype is not enforced otherwise |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub PrintEmailWithoutTheHeader(olkMsg As Outlook.MailItem) | |
Const OLECMDID_PRINT = 6 | |
Const OLECMDEXECOPT_DONTPROMPTUSER = 2 | |
Dim objIE As Object, strHead As String, strFoot As String | |
strHead = GetIEHeaderFooter("header") | |
strFoot = GetIEHeaderFooter("footer") | |
SetIEHeaderFooter "header", "" | |
SetIEHeaderFooter "footer", "" | |
Set objIE = CreateObject("InternetExplorer.Application") | |
With objIE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub RunAScriptRuleRoutine(MyMail As MailItem) | |
Dim strID As String | |
Dim olNS As Outlook.NameSpace | |
Dim msg As Outlook.MailItem | |
strID = MyMail.EntryID | |
Set olNS = Application.GetNamespace("MAPI") | |
Set msg = olNS.GetItemFromID(strID) | |
' do stuff with msg, e.g. |