Skip to content

Instantly share code, notes, and snippets.

View damadorPL's full-sized avatar

Krzysztof Radzikowski damadorPL

View GitHub Profile
@damadorPL
damadorPL / Optimize-PSReadlineHistory.ps1
Created July 28, 2023 19:47 — forked from rkeithhill/Optimize-PSReadlineHistory.ps1
Removes duplicate and optionally short commands from your PSReadline history file
<#
.SYNOPSIS
Optimizes your PSReadline history save file.
.DESCRIPTION
Optimizes your PSReadline history save file by removing duplicate
entries and optionally removing commands that are not longer than
a minimum length
.EXAMPLE
C:\PS> Optimize-PSReadlineHistory
Removes all the duplicate commands.
@damadorPL
damadorPL / better_powershell.md
Created April 5, 2023 18:59 — forked from mh-firouzjah/better_powershell.md
how to add zsh-like theme and feature to windows powershell

Better PowerShell

Theme | History | KeyBinding

MyPowershell

in order to make windows powershell more comfortable and add a some theme and features like history binding, auto complete on keypress and so on, if you have used linux teminl wiht zsh for example, we are going to make powershell like that as much as we can.

What we will achieve

@damadorPL
damadorPL / keygen.py
Created March 22, 2023 10:48 — forked from SebastianGrans/keygen.py
Keygen for VS Code extension Monokai Pro
#
# This is a key generator for the VS Code/Codium extension Monokai Pro
# https://marketplace.visualstudio.com/items?itemName=monokai.theme-monokai-pro-vscode
#
# If you like the extension, you should buy it.
#
# 1. Run this script. It will ask for your email (it doesn't have to be real)
# 2. Run `> Monokai Pro: enter license` from the command palette (ctrl+shift+p)
# 3. Enter the same email as in step 1, followed by the generated key.
# 4. DONE! :)
@damadorPL
damadorPL / README.md
Created September 25, 2022 17:11 — forked from tomdaley92/README.md
Proxmox - Email Alerts Setup (gmail)

Proxmox - Email Alerts Setup (gmail)

  1. SSH into proxmox node and become root user. Run the following commands to download extra software dependencies we'll need.

    apt update
    apt install -y libsasl2-modules
  2. Enable 2FA for the gmail account that will be used by going to security settings

@damadorPL
damadorPL / licence activation.php
Created August 23, 2022 20:49 — forked from mattradford/licence activation.php
ACF5 Pro licence activation. Could be adapted for any other plugin that requires a licence key, but doesn't yet support defining it in wp-config. Fires on theme activation.
// Place this in wp-config
define( 'ACF_5_KEY', 'yourkeyhere' );
// Set ACF 5 license key on theme activation. Stick in your functions.php or equivalent.
function auto_set_license_keys() {
if ( ! get_option( 'acf_pro_license' ) && defined( 'ACF_5_KEY' ) ) {
$save = array(
'key' => ACF_5_KEY,
@damadorPL
damadorPL / import-optimizations.md
Created June 1, 2022 13:07 — forked from trey8611/import-optimizations.md
WP All Import - Optimize your import speed.
@damadorPL
damadorPL / woocommerce-remove-virtual-billing-fields.php
Last active December 3, 2019 12:27 — forked from BFTrick/woocommerce-remove-virtual-billing-fields.php
Remove the billing address fields for free virtual orders in WooCommerce
<?php
/**
* Plugin Name: WooCommerce Remove Billing Fields for Free Virtual Products
* Plugin URI: https://gist.github.com/BFTrick/7873168
* Description: Remove the billing address fields for free virtual orders
* Author: Patrick Rauland
* Author URI: http://patrickrauland.com/
* Version: 2.0
*
* This program is free software: you can redistribute it and/or modify
@damadorPL
damadorPL / custom-search-acf-wordpress.php
Created July 23, 2018 19:48 — forked from charleslouis/custom-search-acf-wordpress.php
PHP - Wordpress - Search - wordpress custom search function that encompasses ACF/advanced custom fields and taxonomies and split expression before request
<?php
/**
* [list_searcheable_acf list all the custom fields we want to include in our search query]
* @return [array] [list of custom fields]
*/
function list_searcheable_acf(){
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF");
return $list_searcheable_acf;
}
@damadorPL
damadorPL / index.html
Created November 15, 2016 20:08 — forked from anonymous/index.html
Capture FB Reactions count and show them on webpage
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My FB Reactions Page</title>
<style>
html {
box-sizing: border-box;
width: 100%;