Skip to content

Instantly share code, notes, and snippets.

@xtu
xtu / openssl.cnf.diff
Created October 5, 2023 23:32 — forked from rdh27785/openssl.cnf.diff
diff -uN /etc/ssl/openssl.cnf\~original /etc/ssl/openssl.cnf for Nextcloud with OpenSSL 3
--- /etc/ssl/openssl.cnf~original 2022-03-16 08:35:51.000000000 +0000
+++ /etc/ssl/openssl.cnf 2022-05-04 02:37:30.336530711 +0000
@@ -56,6 +56,7 @@
# List of providers to load
[provider_sect]
default = default_sect
+legacy = legacy_sect
# The fips section name should match the section name inside the
# included fipsmodule.cnf.
# fips = fips_sect
$env:FUSION_LOG='C:\fusion-log\'
function Enable-FusionLog {
Set-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name ForceLog -Value 1 -Type DWord
Set-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogFailures -Value 1 -Type DWord
Set-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogResourceBinds -Value 1 -Type DWord
Set-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogPath -Value $env:FUSION_LOG -Type String
if (-not (Test-Path $env:FUSION_LOG)) {
mkdir $env:FUSION_LOG | Out-Null
@xtu
xtu / WinFormMonitor.cs
Last active November 28, 2018 14:16
A class to monitor when a WinForm form is found
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace WindowsFormsApp11
{
public class WinFormMonitor : IDisposable
{
private readonly IntPtr _eventHook;
@xtu
xtu / slack_delete.py
Created November 13, 2017 11:21 — forked from jackcarter/slack_delete.py
Delete Slack files older than 30 days. Rewrite of https://gist.github.com/jamescmartinez/909401b19c0f779fc9c1
import requests
import time
import json
token = ''
#Delete files older than this:
ts_to = int(time.time()) - 30 * 24 * 60 * 60
def list_files():
@echo off
@rem ==================
@rem Source:
@rem https://gist.github.com/jcppkkk/8330314
@rem Description:
@rem Install context menu to allow user opens file with Sublime Text as User or Admin, or Open Folder with Sublime Text.
@rem Usage:
@rem Download this .bat file to in Sublime Text's installation folder.
@rem Execute this batch file. It will download elevate codes and setup context menu.
@rem ==================
@xtu
xtu / default.xml
Created February 19, 2015 13:39
XML: start
<?xml version="1.0" encoding="UTF-8"?>
<root>
</root>
@xtu
xtu / Bootstrap.html
Last active August 29, 2015 14:14
HTML: Bootstrap basic
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 101 Template</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
@xtu
xtu / Program.cs
Last active August 29, 2015 14:14
C#: Program Entry
using System;
class Program
{
public static void Main(String[] args)
{
Console.WriteLine("Hello World!");
}
}