Skip to content

Instantly share code, notes, and snippets.

View lunule's full-sized avatar

lunule lunule

  • Vigilante One
  • Brno
View GitHub Profile
@lunule
lunule / wp-buttons.css
Last active December 7, 2023 21:46 — forked from SeanTOSCD/wp-buttons.css
WordPress Admin Style Buttons
/*
wp admin style buttons:
To use for links styled as buttons, add a class attribute to the
<a> tag and add "button" as a value. This sets up the basic button
structure. Then you choose which button you want to use. Add a
value of "blue" for the blue button or "gray" for the gray button.
Ex. <a href="#" class="button blue">Blue Button</a>
*/
@lunule
lunule / shell-setup.ps1
Created May 11, 2023 22:07 — forked from mikepruett3/shell-setup.ps1
Packages to install via scoop, winget, choco, and other tools...
<#
.SYNOPSIS
Script to Initialize my custom powershell setup.
.DESCRIPTION
Script uses scoop
.NOTES
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted.
Author: Mike Pruett
Date: October 18th, 2018
@DeveloperWil
DeveloperWil / woocommerce-stripe-product-customer-metadata
Created March 30, 2021 22:36
WooCommerce: Stripe product and customer metadata
/**
* Add Stripe metadata along with WooCommerce purchase
*
* @param $metadata
* @param $order
* @param $source
* @return mixed
*/
function wbdc_filter_wc_stripe_payment_metadata( $metadata, $order, $source ) {
@saltnpixels
saltnpixels / membership_meta.php
Last active November 3, 2022 19:55
adding membership meta to rcp from ACF
<?php
/*--------------------------------------------------------------
# Saving Features to Membership Levels from an acf repeater field for RCP Pro
--------------------------------------------------------------*/
function some_feature_list( $level ) {
/**
* @var RCP_Levels $rcp_levels_db
*/
global $rcp_levels_db;
<?php
$args = array(
'label' => '', // Text in Label
'class' => '',
'style' => '',
'wrapper_class' => '',
'value' => '', // if empty, retrieved from post meta where id is the meta_key
'id' => '', // required
'name' => '', //name will set from id if empty
@netmagik
netmagik / enable HSTS
Last active May 22, 2017 21:43
Enable HSTS - HTTP Strict Transport Security in .htaccess
<IfModule mod_headers.c>
Header set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
</IfModule>
<?php
/**
* Kirki Advanced Customizer
*
* This is a sample configuration file to demonstrate all fields & capabilities.
*
* CAUTION:
* USE THIS WITH THE DEVELOP BRANCH ON THE GITHUB REPOSITORY:
* https://github.com/aristath/kirki/tree/develop
*
@morales2k
morales2k / jquery-sidr.js
Created July 8, 2014 17:31
The jquery-sidr fix that made it work for me in all browsers. Try it out and see if it helps!
/*
* Sidr
* https://github.com/artberri/sidr
*
* Copyright (c) 2013 Alberto Varela
* Licensed under the MIT license.
*/
;(function( $ ){
@hdragomir
hdragomir / sm-annotated.html
Last active June 13, 2024 03:01
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);