Skip to content

Instantly share code, notes, and snippets.

@JamesDawson
JamesDawson / setup-pyenv-poetry-windows.ps1
Last active May 10, 2024 14:00
Setup python, pyenv-win and poetry on Windows
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[string] $PythonVersion
)
$ErrorActionPreference = "Stop"
$ProgressPreference = "SilentlyContinue"
Set-StrictMode -Version Latest
@Striffly
Striffly / README.md
Last active May 10, 2024 13:59
Gravity Forms with AJAX, conditional logic, pages transitions (compatible with Barba.js, Taxi.js, Highway.js, ...)

The following code enables the use of Gravity Forms (2.8.7 as of now) with the following features:

  • AJAX loading, 100% functional
  • Functional with page transitions (Barba.js, Taxi.js, Highway.js)
  • Enqueue Gravity Forms scripts used by each forms (including conditional logic scripts)
  • Works with recaptcha (with recent version of Gravity Forms reCAPTCHA Add-On, scripts are automaticaly enqueued)
  • Keep the form displayed after submission (optional)
  • Scripts moved to footer (optional)

The code was initially integrated into projects using roots/sage. I adapted the code for integration into "vanilla" WordPress projects but I have less feedback compared to the use I have with my stack, so feel free to let me know if there are any errors in the comments!

@Tommy-b
Tommy-b / GRAVITY FORMS WITH SWUP - BARBA PAGE TRANSITIONS
Last active May 10, 2024 13:59
This allows your gravity forms to load via ajax to ensure they work correctly with page transitions that have no window/document.onload
This allows your gravity forms to load via ajax to ensure they work correctly with page transitions that have no window/document.onload
# install_certifi.py
#
# sample script to install or update a set of default Root Certificates
# for the ssl module. Uses the certificates provided by the certifi package:
# https://pypi.python.org/pypi/certifi
import os
import os.path
import ssl
import stat
@fftfaisal
fftfaisal / IDM_License_KEY.json
Last active May 10, 2024 13:54
IDM License KEY
{
"first_name":"Faisal",
"last_name":"Ahmed",
"email":"support@faisal.com.bd",
"serial":"I23LZ-H5C2I-QYWRT-RZ2BO"
}
@kennypete
kennypete / navigating_the_modes_of_Vim.md
Created April 18, 2024 20:46
Navigating the modes of Vim

Navigating the modes of Vim

This diagram illustrates navigating through Vim’s modes. It was built factoring Vim 9 (i.e., all its modes, including up to two new modes, cr and cvr, in November 2023). Information about the state() and 'showmode' is provided too.

SVG version

Some features are only available in the SVG version. It is not provided directly from within this gist’s files because SVGs do not always play nicely in GitHub (particularly, refusing to display embedded fonts).

The SVG version includes hover text help, which shows pertinent information about the underlying key, command, mode, etc.

@rutcreate
rutcreate / README.md
Last active May 10, 2024 13:52
Install Python 3.10.x on Ubuntu 20.04

Prerequisite

sudo apt update
sudo apt install software-properties-common -y

Add custom APT repository

// attribution: http://stackoverflow.com/a/15281070/32453
// you can compile this with gcc [mingw or mingw-w64] and probably other compilers as well
#include <stdlib.h> // NULL
#include <stdbool.h> // false
#include <windows.h> // AttachConsole, CTRL_C_EVENT, etc.
#include <stdio.h> // printf
#include <strsafe.h>
void logLastError()
@conorbranagan
conorbranagan / gist:4513828
Last active May 10, 2024 13:52
Linux System Metrics

Linux System Metrics

CPU

  • system.cpu.idle: % Idle CPU
  • system.cpu.system: % System CPU
  • system.cpu.user: % User CPU

Disk