Skip to content

Instantly share code, notes, and snippets.

@cagrimmett
cagrimmett / 5-1.txt
Last active September 24, 2022 17:26
WordPress Named Core Release Contributors, 5.0-6.0
https://profiles.wordpress.org/0x6f0/
https://profiles.wordpress.org/1265578519-1/
https://profiles.wordpress.org/1naveengiri/
https://profiles.wordpress.org/aardrian/
https://profiles.wordpress.org/jorbin/
https://profiles.wordpress.org/abdullahramzan/
https://profiles.wordpress.org/abhayvishwakarma/
https://profiles.wordpress.org/abhijitrakas/
https://profiles.wordpress.org/ibachal/
https://profiles.wordpress.org/achbed/
I am attesting that this GitHub handle cagrimmett is linked to the Tezos account tz1Q2eekfg9ZAoxowc7YPeC14EfJLxbd1Sfw for tzprofiles
sig:edsigtsT3Zc1qYQW6sJJoavVWM1bEQn2utU6NG4795U1qMANDKwrFPNgb9ZhoDMwAN3p9dKDzgYacBynJgLpcw3QatL64GbatWn
@cagrimmett
cagrimmett / post-redirects.php
Last active November 26, 2019 23:55
redirect blog.crash.co posts to crash.co
<?php
add_action( 'template_redirect', function() {
global $post;
if ( current_user_can('administrator') ) { return; }
if (is_single()){
$cat = get_the_category();
wp_redirect( 'https://crash.co/content/' . $cat[0]->slug . '/' . $post->post_name );
die;
} else {
wp_redirect( 'https://crash.co/content/all' );
@cagrimmett
cagrimmett / get_check_query_string.php
Created June 6, 2018 19:16
Get query string and check it.
<?php
$key = $_SERVER['QUERY_STRING'];
if ($key == 'RANDOM_TOKEN' ) {
echo "String matches!";
} else {
exit("You are not authorized. Go away.");
}
?>

Keybase proof

I hereby claim:

  • I am cagrimmett on github.
  • I am cagrimmett (https://keybase.io/cagrimmett) on keybase.
  • I have a public key ASC538jgUqYEVxuHxZKB4S8nFVUdyGklll9b8CkJ0ONthgo

To claim this, I am signing this object:

@cagrimmett
cagrimmett / ngrams.py
Created September 4, 2017 16:46 — forked from benhoyt/ngrams.py
Print most frequent N-grams in given file
"""Print most frequent N-grams in given file.
Usage: python ngrams.py filename
Problem description: Build a tool which receives a corpus of text,
analyses it and reports the top 10 most frequent bigrams, trigrams,
four-grams (i.e. most frequently occurring two, three and four word
consecutive combinations).
NOTES
@cagrimmett
cagrimmett / .block
Last active July 27, 2017 00:53
Sol LeWitt's Wall Drawing 86 Modified for Two Angles
license: gpl-3.0
@cagrimmett
cagrimmett / Find-Replace-WordPress-Snippet.SQL
Created July 23, 2017 21:52
SQL query to replace text on WordPress sites
UPDATE wp_posts SET post_content = REPLACE(post_content, 'FIND', 'REPLACE');
@cagrimmett
cagrimmett / .block
Last active December 26, 2019 23:14
Sol LeWitt 853
license: gpl-3.0
@cagrimmett
cagrimmett / .block
Last active November 22, 2016 22:02
Sol LeWitt 852
license: gpl-3.0
height: 960