Skip to content

Instantly share code, notes, and snippets.

View seankmchenry's full-sized avatar
🎣
Gone fishing.

Sean McHenry seankmchenry

🎣
Gone fishing.
View GitHub Profile
@colmmacc
colmmacc / wordle-cribs.md
Created January 3, 2022 01:12
Wordle Letter Frequency Cribs

Wordle Letter Frequency Table

If you're used to solving cryptic puzzles, or deciphering texts using crypt-analytical cribs, it can be useful to know the relative frequency of letters in the distribution of words. Wordle has a built-in list of 5-letter words. That list isn't the same as all of the five letter words in the dictionary, or even only the common ones. Perfectly common words like 'tudor' are omitted. This gist contains a few useful tables that are worth familiarizing yourself with if you want to solve wordle puzzles logically.

The raw frequency of each letter

@fworks
fworks / install-zsh-windows-git-bash.md
Last active May 21, 2024 05:32
Zsh / Oh-my-zsh on Windows Git Bash
@jawinn
jawinn / primary_category.php
Last active December 8, 2022 21:42
Display Primary Category (Yoast's WordPress SEO)
<?php
/**
* Get the Yoast primary category from its post meta value, and displays it, with HTML markup.
* If there is no primary category set, it displays the first assigned category.
*
* @param boolean $useCatLink Whether to link the category, if it exists
* @return void
*/
function yourtheme_display_yoast_primary_category( $useCatLink = true ) {
@BurlesonBrad
BurlesonBrad / functions.php
Created March 10, 2016 21:34 — forked from TimBHowe/functions.php
Reduce or remove WooCommerce 2.5 minimum password strength requirement for creating a user account. Warning: Use at your own risk.
<?php
/**
*Reduce the strength requirement on the woocommerce password.
*
* Strength Settings
* 3 = Strong (default)
* 2 = Medium
* 1 = Weak
* 0 = Very Weak / Anything
*/
@schmidt1024
schmidt1024 / svg.js
Created June 3, 2015 13:59
Replace all SVG images with inline SVG using jQuery
/*
* Replace all SVG images with inline SVG
*/
jQuery('img.svg').each(function(){
var $img = jQuery(this);
var imgID = $img.attr('id');
var imgClass = $img.attr('class');
var imgURL = $img.attr('src');
jQuery.get(imgURL, function(data) {
@michahell
michahell / google-maps-set-center-with-offset.js
Last active February 22, 2024 15:21 — forked from msherstobitow/google-maps-set-center-with-offset.js
google maps set and get center with offset
google.maps.Map.prototype.setCenterWithOffset= function(latlng, offsetX, offsetY) {
var map = this;
var ov = new google.maps.OverlayView();
ov.onAdd = function() {
var proj = this.getProjection();
var aPoint = proj.fromLatLngToContainerPixel(latlng);
aPoint.x = aPoint.x+offsetX;
aPoint.y = aPoint.y+offsetY;
map.setCenter(proj.fromContainerPixelToLatLng(aPoint));
};
@JiveDig
JiveDig / acf_create_posts_acf_form.php
Last active February 28, 2023 06:29
Page template to create posts on the front end via Advanced Custom Fields Pro
<?php
/**
* Template Name: Create Post
*
* @author Mike Hemberger
* @link http://thestizmedia.com/front-end-posting-with-acf-pro/
* @uses Advanced Custom Fields Pro
*/
/**
@vitorbritto
vitorbritto / rm_mysql.md
Last active June 15, 2024 05:21
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql
    
@norcross
norcross / calc-read-time.php
Created July 3, 2014 02:51
calculate and display an estimated reading time
<?php
/**
* handle the calculation
* @param integer $seconds [description]
* @return [type] [description]
*/
function rkv_calc_read_time( $seconds = 0 ) {
// calc the minutes
@dsoares
dsoares / imapsync.md
Last active May 16, 2018 12:31
Install and use imapsync in Mac OS X

Install imapsync in Mac OS X (10.9)

brew tap dsoares/imapsync
brew install imapsync

Run (example)

imapsync --include <regexp> --exclude "All Mail|Spam|Trash" \
  --host1 imap.from.server --user1 foo --password1 secret1 --ssl1 \

--host2 imap.dest.server --user2 bar --password2 secret2 --ssl2