Discover gists
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
from PyQt5 import QtCore, QtWidgets | |
class FlowLayout(QtWidgets.QLayout): | |
def __init__(self, parent=None, margin=0, spacing=-1): | |
super().__init__(parent) | |
if parent is not None: | |
self.setContentsMargins(margin) | |
self.setSpacing(spacing) |
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
static void add_ink_annot_sample(const char *input_pdf) | |
{ | |
const char *output_pdf = next_file_name(input_pdf); | |
fz_context *ctx = fz_new_context(NULL, NULL, FZ_STORE_UNLIMITED); | |
fz_try(ctx) | |
{ | |
pdf_document *doc = pdf_open_document(ctx, input_pdf); | |
fz_page *page = fz_load_page(ctx, (fz_document *)doc, 0); | |
pdf_page *pdfpage = (pdf_page *)page; |
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
<?php | |
/** | |
* Enable functionality for the Edit Member Panel when saving user info. | |
* Add this code to your site, follow this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
**/ | |
function my_custom_ffl_fix_user_display_name() { | |
// Make sure Force First and Last Name is installed. | |
if ( ! function_exists( 'ffl_fix_user_display_name' ) ) { | |
return; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<files> | |
<file path="C:\ProgramData\chocolatey\lib\chromedriver\chromedriver-win64.zip.txt" checksum="CFC27631840C495DD2EADA6B95A7BCC2" /> | |
<file path="C:\ProgramData\chocolatey\lib\chromedriver\chromedriver.nupkg" checksum="DEC7271944F29159017028CA56F66FA6" /> | |
<file path="C:\ProgramData\chocolatey\lib\chromedriver\chromedriver.nuspec" checksum="6FC26F77BD497CCC7D454457414E57DA" /> | |
<file path="C:\ProgramData\chocolatey\lib\chromedriver\tools\chocolateyinstall.ps1" checksum="CC44DADB60CEC3AF4E02992E084646AE" /> | |
<file path="C:\ProgramData\chocolatey\lib\chromedriver\tools\chromedriver-win64\chromedriver.exe" checksum="8AA6451DC08875D5DEDEF48DADDA1CF5" /> | |
<file path="C:\ProgramData\chocolatey\lib\chromedriver\tools\chromedriver-win64\LICENSE.chromedriver" checksum="C408A301E3407C3803499CE9290515D6" /> | |
<file path="C:\ProgramDa |
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
/** | |
Usage: | |
1. ssh root@<UDM-Pro IP or hostname> | |
2. wget -O /tmp/mongo_prune.js https://gist.github.com/matjahs/bc895b6ae5b3e796783d306f7f7fde09/raw/30e1a8cf1c63c62e28e690d0dbc730e30b3d75de/mongo_prune.js | |
3. mongo --port 27117 --quiet --eval "var days=14, dryrun=true" /tmp/mongo_prune.js | |
**/ | |
if (!days) { | |
throw new Error('days not defined'); | |
exit(1); |
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
<!DOCTYPE html> | |
<html> | |
<head><meta charset="utf-8"><title>HydrationBot Consent</title></head> | |
<body> | |
<h1>HydrationBot SMS Consent</h1> | |
<p> | |
I, John Paredes, consent to receive automated SMS reminders (HydrationBot) | |
at +1 425 971 2439. I understand I can reply <strong>STOP</strong> at any time to unsubscribe. | |
</p> | |
</body> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<files> | |
<file path="C:\ProgramData\chocolatey\lib\nginx-service\nginx-service.nupkg" checksum="6EA3AA70D9D6595B32F1281D579656B8" /> | |
<file path="C:\ProgramData\chocolatey\lib\nginx-service\nginx-service.nuspec" checksum="99E90EE70D732F82C4D8AAC3ED61B4E2" /> | |
<file path="C:\ProgramData\chocolatey\lib\nginx-service\bin\nginx.exe" checksum="322805FC07A06F006B7BB498F3CFFCD1" /> | |
<file path="C:\ProgramData\chocolatey\lib\nginx-service\bin\nginx.exe.ignore" checksum="5634239FCDCB46B5FFDD6EB31E3067C3" /> | |
<file path="C:\ProgramData\chocolatey\lib\nginx-service\bin\nginx.zip" checksum="82305AEC8811BCEF365AD350610CBD34" /> | |
<file path="C:\ProgramData\chocolatey\lib\nginx-service\bin\conf\fastcgi.conf" checksum="C7410CB0F3605B4201888C91FBA1DED2" /> | |
<file path="C:\ProgramData\chocolatey\lib\nginx-service\bin\conf\fastcgi_params" checksu |
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
#====================================================================== | |
# CRYSTAL DATA | |
#---------------------------------------------------------------------- | |
data_VESTA_phase_1 | |
_chemical_name_common 'Cr0.5 In0.5 Si Te3' | |
_cell_length_a 6.890000 | |
_cell_length_b 6.890000 | |
_cell_length_c 21.018000 |
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
java -cp "D:\\JetBrains\\IntelliJ IDEA\\plugins\\java-decompiler\\lib\\java-decompiler.jar" org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler -dgs=true "D:\\classDir" "D:\\srcDir" |
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
#requires -Version 3.0 | |
<# | |
.SYNOPSIS | |
My Veeam Report is a flexible reporting script for Veeam Backup and | |
Replication. | |
.DESCRIPTION | |
My Veeam Report is a flexible reporting script for Veeam Backup and | |
Replication. This report can be customized to report on Backup, Replication, |
NewerOlder