Skip to content

Instantly share code, notes, and snippets.

View stevygee's full-sized avatar

Stefan Grassberger stevygee

View GitHub Profile
@jdmwood
jdmwood / setup-ngrok.py
Last active September 28, 2023 14:37
Script to help setting up Wordpress managed by wp-env for use with ngrok
#! /usr/bin/env python3
"""
Setup ngrok for local development with WordPress when used with wp-env. Follows instructions from
https://ngrok.com/docs/using-ngrok-with/wordpress/
Notes
-----
@yunusga
yunusga / wpcf7.js
Created July 5, 2019 06:46
Scroll to first invalid field on Contact Form 7 validation error event
/**
* Scroll to first invalid field
* WPCF7 on validation error event
*/
document.addEventListener( 'wpcf7invalid', function( event ) {
setTimeout( function() {
$('html').stop().animate({
scrollTop: $('.wpcf7-not-valid').eq(0).offset().top - 140,
}, 500, 'swing');
}, 100);
@ocReaper
ocReaper / akos-resch-wpml-subdir-ja-to-jp.php
Last active April 10, 2020 10:16
WordPress mu-plugin to change the WPML language code in the URL from ja to jp
<?php
/**
* Change the Japanese subdirectory language code from ja to jp
*
* @param array $language_codes_map
*
* @return array
*/
function akos_resch_wpml_subdirectory_language_code_ja_to_jp( $language_codes_map ) {
@jacurtis
jacurtis / _spacing-helpers.scss
Last active April 15, 2024 12:05
SASS Margin and Padding Helpers Loop. Generates .m-t-10 type helper classes.
/*
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects.
It will generate several classes such as:
.m-r-10 which gives margin-right 10 pixels.
.m-r-15 gives MARGIN to the RIGHT 15 pixels.
.m-t-15 gives MARGIN to the TOP 15 pixels and so on.
.p-b-5 gives PADDING to the BOTTOM of 5 pixels
.p-l-40 gives PADDING to the LEFT of 40 pixels
@Ikalou
Ikalou / git_and_unity.md
Last active April 22, 2024 04:01
Git and Unity

EDIT: this is an old post and a lof the information in this document is outdated.

Using Git with Unity

Git logo

Git is a popular free and open source distributed version control system.

I am new to Unity, but as a long time git user, I wanted to use git for my

@jimmynotjim
jimmynotjim / _sassy_link_underlines.md
Last active October 6, 2020 15:44
Sassy Link Underlines
@benhuson
benhuson / cust-vimeo-oembed
Last active April 18, 2020 23:30
Customise WordPress Vimeo oEmbed
<?php
/**
* Customise WordPress Vimeo oEmbed
* https://developer.vimeo.com/apis/oembed
*/
function my_oembed_fetch_url( $provider, $url, $args ) {
if ( strpos( $provider, 'vimeo.com' ) !== false) {
@magicznyleszek
magicznyleszek / multiply-blending-mode-to-png.md
Created August 20, 2014 11:27
Multiply blending mode to PNG in Photoshop
  1. copy your image (Ctrl+A and Ctrl+C)
  2. make a new document-sized pure-black layer behind it
  3. group the black layer and yor image together
  4. add mask to the group
  5. enter mask edit mode (alt+click on the mask icon/thumbnail)
  6. paste your image in the mask (b/w) and then invert it.
  7. save it as a 24-bit transparent PNG
@mitchwongho
mitchwongho / Docker
Last active November 29, 2023 06:36
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash
@thagxt
thagxt / Get Permalink without domain.php
Created April 24, 2014 13:43
How to get WordPress Permalinks without the domain