Skip to content

Instantly share code, notes, and snippets.

View skoskie's full-sized avatar

Shelton Koskie skoskie

View GitHub Profile
@skoskie
skoskie / threaded.plist
Created December 2, 2021 18:52 — forked from maxandersen/threaded.plist
Threaded view for recent versions of mailmate. Put this in `~/Library/Application Support/MailMate/Resources/Layouts/Mailboxes/threaded.plist` and enable it via `View > Layout > Threaded`
{
name = "Threaded";
rootViewer =
{
viewerType = "MmSplitView";
orientation = "horizontal";
children =
(
{
viewerType = "MmBoxView";
@skoskie
skoskie / Bookmarklet.js
Last active April 17, 2020 17:45 — forked from timwright12/Bookmarklet.js
Bookmarklet to share links in WordPress
/*
* Bookmarklet is an external script for sharing content Via wordpress
* It was specifically designed for csskarma.com, but feel free to nab it.
*
* Bookmarklet content ( NOTE: change the URL path ):
*
* javascript:(function ()%7Bvar jsCode %3D document.createElement(%27script%27)%3BjsCode.setAttribute(%27src%27, %27https://csskarma.com/js/bookmarklet.js%27)%3Bdocument.body.appendChild(jsCode)%3B %7D())%3B
*
*/
@skoskie
skoskie / wp.sh
Created April 4, 2020 18:18 — forked from bgallagh3r/wp.sh
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
@skoskie
skoskie / rclone.conf
Created March 10, 2020 15:53 — forked from werrpy/rclone.conf
rclone Unlimited Cloud Storage Script (Google Drive)
[media-local-secret]
type = crypt
remote = secret/media
filename_encryption = standard
password =
password2 =
[media-remote-secret]
type = crypt
remote = gdrive:path/to/media
@skoskie
skoskie / readme.md
Created July 20, 2019 03:09
A terminal script to quickly spin up an instance of wordpress. It's not really a fork, but it was fully inspired by another gist I commented on here: https://gist.github.com/BFTrick/11294357#gistcomment-2975609

Here's the file structure I use, and the script "kinda sorta" assumes a similar hierarchy; i.e. with the git root one level above the web root.

ProjectName/Repo/.git/
                /public/

To start out, just create the Repo directory in your project directory. The Repo directory should be empty when you run the script. Then cd ProjectName/Repo, and run the wp-up.sh script, or maybe just copy the pieces that work for you.

I should note that I keep wp-config.php one level above the web root. If that's not your thing, just remove (or skip) the line that reads mv ./public/wp-config-sample.php ./wp-config.php.

@skoskie
skoskie / monit-setup.sh
Last active October 8, 2022 02:01
Monit -- Quick Download and Config
#!/bin/bash
# Must run this as sudo. How to make sure of that??
if [ "$EUID" -ne 0 ]
then
# Turn off history expansion to make it easier to echo exlaimation points
set +H
printf "%s\n" "Error: Monit installation and setup must be run as root. Type 'sudo !!' at the prompt, enter your password, in order to try again."
@skoskie
skoskie / highlightCompensatedAmazonReviews.js
Created October 30, 2015 17:50
Highlight Compensated Reviews on Amazon.com
// Amazon pages seem to intermittently have jQuery loaded.
if (!window.jQuery) {
var jqlib = document.createElement('script');
jqlib.setAttribute('type', 'text/javascript');
jqlib.setAttribute('src','//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js');
document.head.appendChild(jqlib);
}
// Make sure jQuery before executing.
function defer(method) {
Snippet: [[SnippetName]]
Chunk: [[$ChunkName]]
System Setting: [[++SettingName]]
TV: [[*fieldName/TvName]]
Link tag: [[~PageId? &paramName=`value`]]
Placeholder: [[+PlaceholderName]]
<?php
@skoskie
skoskie / main-slide-reversed.scss
Last active August 29, 2015 14:03
Automatic Slider Scale Down Concept
// What if we wanted to reverse the calculations to align with pre-defined breakpoints?
// You must start mobile-first.
// Maximum cropable area will be the size of the largest change between breakpoints.
// 1 - 768/992 = 22.6% <-- Winner! We may have to crop ~23% of the image width before snapping to the next size.
// 1 - 992/1200 = 17.3%
.img{
display:none; // $screen-xs-min
height: auto; // Again, this should be constant on all sizes. The opposite of the previous method.
@skoskie
skoskie / all-shortcode-args.php
Last active March 4, 2019 02:42
In Wordpress, this function will get a list of all parameters defined in all functions that are used as shortcodes. Why anyone would ever need something like this, I have no idea.
<?php
/**
* Gets all arguments for all shortcode functions and returns them as an array.
*
* @method get_all_shortcode_args
*
* @param boolean $ignore_native Whether to ignore the native Wordpress shortcodes.
*
* @param boolean $dedupe Whether to return unique values or allow duplicates.
*