Skip to content

Instantly share code, notes, and snippets.

@Lonsdale201
Lonsdale201 / code
Last active May 9, 2024 07:42
JetEngine - Calculated callback Lowest highset between calc
// copy this code in the child theme functions.php or a specific code plugin like FluentSnippets
// For the code to work, you need to install the Calculated Callback Add-on addons
// Plugin: https://github.com/MjHead/jet-engine-calculated-callback
// Plugin desc: https://crocoblock.com/knowledge-base/jetengine/calculated-callback-add-on/#custom-callback
// when you pasted the code, open the Elementor editor, and place the Dynamic Field widget, enable the Filter Field output
// in the dropdown, select the Calculated field Callback
// in the next dropdown, select the between_high_and_low option
// Note that this calculation works correctly only for : Number type meta
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active May 9, 2024 07:41
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@wojteklu
wojteklu / clean_code.md
Last active May 9, 2024 07:41
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@Semo
Semo / Howto_Zsh5-6-2_Centos7.md
Last active May 9, 2024 07:36
How to install Zsh version 5.6.2 into CentOS 7

How to install Zsh version 5.6.2 into CentOS 7

Given that you have a clean installation of CentOS 7 which was already updated, by you, then you still have some dependencies to install make and install the external Zsh from the source. You must be root to get the stuff done.

Install GCC Development Tools

yum groupinstall "Development tools"

Check if it's working

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 9, 2024 07:41
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@ChuanyuXue
ChuanyuXue / morandi.py
Last active May 9, 2024 07:30
Morandi Palette: A palette with 18 colors inspired by Giorgio Morandi
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from gurobipy import Model, GRB
colors = [
'#686789', '#B77F70', '#E5E2B9', '#BEB1A8', '#A79A89', '#8A95A9',
'#ECCED0', '#7D7465', '#E8D3C0', '#7A8A71', '#789798', '#B57C82',
'#9FABB9', '#B0B1B6', '#99857E', '#88878D', '#91A0A5', '#9AA690'
]
@JakubOboza
JakubOboza / private-docker-regs-with-free-tiers.markdown
Created May 30, 2019 07:15
Private Docker registry with free tiers for Developers.

List of sites with free tier limits

  • Docker Hub - One private repo/image spot for free
  • Three Scale - Very generous free tier 50GB of space, 500 Pulls a month etc..
  • Canister - 20 private repos with almost no limits on free tier
  • Code Fresh - Free tier for developers

Setup your own private registry

@kiding
kiding / HDRGainMap.swift
Last active May 9, 2024 07:29
Extracting HDR Gain Map from iOS 14.1+ (iPhone 12+) photos
import UIKit
import MobileCoreServices.UTCoreTypes
if #available(iOS 14.1, *) {
let input = Bundle.main.url(forResource: "IMG_0037", withExtension: "HEIC")!
let output = FileManager().temporaryDirectory.appendingPathComponent("IMG_0037.GAIN_MAP.BMP")
let source = CGImageSourceCreateWithURL(input as CFURL, nil)!
// urn:com:apple:photo:2020:aux:hdrgainmap
let dataInfo = CGImageSourceCopyAuxiliaryDataInfoAtIndex(source, 0, kCGImageAuxiliaryDataTypeHDRGainMap)! as Dictionary
@ajvillegas
ajvillegas / 01-custom-block.js
Last active May 9, 2024 07:28
Sample custom WordPress editor block and sidebar controls using using ES5 JavaScript syntax.
/**
* Custom WordPress block boilerplate.
*
* @package My_Block_Package
* @author Alexis J. Villegas
* @link http://www.alexisvillegas.com
* @license GPL-2.0+
*/
( function( blocks, editor, element ) {
@cb372
cb372 / riscv.md
Last active May 9, 2024 07:27
Writing an OS in Rust to run on RISC-V

(This is a translation of the original article in Japanese by moratorium08.)

(UPDATE (22/3/2019): Added some corrections provided by the original author.)

Writing your own OS to run on a handmade CPU is a pretty ambitious project, but I've managed to get it working pretty well so I'm going to write some notes about how I did it.