Skip to content

Instantly share code, notes, and snippets.

@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
@matejskubic
matejskubic / renew self signed certificate.md
Last active April 9, 2024 03:59
Renew Self Signed certificate

To rotate certificates on machines created from the Dynamics 365 for Finance and Operations downloadable VHD, complete the following steps for each certificate. Sample PowerShell scripts are provided where applicable.

  1. Identify which certificates will expire in the next two months.

    Get-ChildItem -path Cert:\LocalMachine\My | Where {$_.NotAfter -lt $(get-date).AddMonths(2)} | Sort NotAfter | Format-Table Subject, Thumbprint, NotAfter

  2. Record the thumbprint of the certificate that needs to be replaced. You will need this in the next step.

  3. Obtain a new certificate for the expired certificate.

nslookup myip.opendns.com resolver1.opendns.com
@matejskubic
matejskubic / list-permissions.sh
Created February 28, 2018 09:41
list find linux file owner and permission recursive
find /opt/bitnami/apps/pootle/ -fprintf pootle.txt %m\\t%u\\t%g\\t%p\\n
tree -pfugi
@matejskubic
matejskubic / VisualStudioReleaseEnvironmentCleanup.ps1
Created September 21, 2017 14:25
VisualStudio Release Environment Cleanup
<#
.SYNOPSIS
.DESCRIPTION
#>
[CmdletBinding()]
Param(
#
@matejskubic
matejskubic / EsbFixer.tt
Created August 31, 2017 14:26
Implement Interface by T4 Text Template Transformation
<#@ template debug="false" hostspecific="true" language="C#" #>
<#@ assembly name="System.Core" #>
<#@ assembly name="EnvDTE" #>
<#@ assembly name="EnvDTE80" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="EnvDTE" #>
<#@ import namespace="EnvDTE80" #>
<#@ output extension=".cs" #>