Skip to content

Instantly share code, notes, and snippets.

@matejskubic
matejskubic / CreateEml.ps1
Created April 1, 2015 20:45
Create eml file from powershell
$mailMessage = New-Object System.Net.Mail.MailMessage
$mailMessage.From = New-Object System.Net.Mail.MailAddress("name@from.dom")
$mailMessage.To.Add("name@to.dom")
$mailMessage.Subject = "FYI: How to save mail messages to .eml files"
$mailMessage.Body = "This can be accomplished by changing the smtp delivery method to a pickup directory..."
$smtpClient = New-Object System.Net.Mail.SmtpClient
$smtpClient.DeliveryMethod = [System.Net.Mail.SmtpDeliveryMethod]::SpecifiedPickupDirectory;
@matejskubic
matejskubic / msdyn365fo-build.ps1
Created October 9, 2018 12:10
MSDYN365FO Build and create deployable package
$srcDir="c:\Temp\ax-build\src\" # source packages in c:\Temp\ax-build\Metadata\
$Build_BuildNumber = "0.0.1"
$binDir=(mkdir -Force (Join-Path $srcDir "..\bin\")).FullName
$Build_SourcesDirectory = Join-Path $srcDir "Metadata"
$PackagingExclusions = ""
pushd $srcDir
$Agent_BuildDirectory=$binDir
@matejskubic
matejskubic / transformXliff-2-LabetTxt.xslt
Created July 17, 2018 14:39
Transform Dynamics 365 Finance and Operations XLIFF translations to txt #msdyn365fo
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"
>
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>
<xsl:template match="/">
<xsl:apply-templates select="xliff:xliff/xliff:file/xliff:body/xliff:group/xliff:trans-unit"/>
</xsl:template>
<xsl:template match="xliff:trans-unit">
@matejskubic
matejskubic / wifipass.bat
Created February 6, 2017 08:40
Windows 10 WiFi password
netsh wlan show profiles
netsh wlan show profiles name="%1" key=clear
@matejskubic
matejskubic / pootle_state_update.sql
Created June 27, 2018 09:23
Update pootle translation unit to translated for units already translated by user
-- UPDATE pootle_store_unit su SET state=200
SELECT * FROM pootle_store_unit su
WHERE EXISTS
(
SELECT *
FROM pootle_app_submission asub
WHERE new_value=200 AND submitter_id=7 AND field=3
AND asub.unit_id=su.id
)
AND su.state=50
https://moakt.com
https://www.mailinator.com
https://www.guerrillamail.com/
https://temp-mail.org/en/
https://tempmail.net/
https://www.10minutemail.com
http://www.yopmail.com/en/
http://www.tempinbox.com/
@matejskubic
matejskubic / SecurityProtocolType.md
Created June 13, 2018 12:08
ServicePointManager, SecurityProtocolType and Tls

[dotnet/Documentation/compatibility/servicepointmanager.securityprotocol-defaults-to-securityprotocoltype.systemdefault.md]

@matejskubic
matejskubic / findex fields.sql
Created June 13, 2018 08:38
List columns on table index [mssql]
select
COL_NAME(ic.object_id, ic.column_id) colName
, *
from sys.index_columns ic
join sys.indexes i
on i.object_id = ic.object_id
and i.index_id = ic.index_id
where i.object_id = object_id('[dbo].[ProjGroup]')
--and i.is_primary_key = 1
--and ic.is_included_column = 0