Skip to content

Instantly share code, notes, and snippets.

View dylan-k's full-sized avatar

Dylan Kinnett dylan-k

View GitHub Profile
@dylan-k
dylan-k / latex.template
Created April 1, 2022 13:39 — forked from michaelt/latex.template
Template for Pandoc LaTeX File
%!TEX TS-program = xelatex
\documentclass[12pt]{scrartcl}
% The declaration of the document class:
% The second line here, i.e.
% \documentclass[12pt]{scrartcl}
% is a standard LaTeX document class declaration:
% we say what kind of document we are making in curly brackets,
% and specify any options in square brackets.
@dylan-k
dylan-k / contract-template.md
Last active April 1, 2022 13:37 — forked from malarkey/Contract Killer 3.md
Template for Contract

The contract

Between [company name]

And [customer name]

Summary

I will always do my best to fulfill your needs and meet your expectations, but it's important to have things written down so that we both know what's what, who should do what and when, and what will happen if something goes wrong.

@dylan-k
dylan-k / README-Template.md
Last active April 1, 2022 13:37 — forked from PurpleBooth/README-Template.md
Template for README file

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running.

You only need to install xorg and lightdm if you have installed Ubuntu Minimal.
If you installed a regullar Ubuntu desktop, just skip to the i3-gaps section.
xorg
====
# Xorg provides a base for a graphical environment
sudo apt install xorg
lightdm
@dylan-k
dylan-k / wordpress-fix-permissions.sh
Last active October 20, 2021 18:26 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# Source for this script: http://www.conigliaro.org/script-to-configure-proper-wordpress-permissions/
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
# To use this script, supply the full path to your wordpress directory
# That directory is often in /var/www, and the wordpress directory is frequently named 'wordpress'
# The example below operates on /var/www/wordpress directory
#
# sudo sh ./fix-wordpress-permissions.sh /var/www/wordpress
@dylan-k
dylan-k / git-clearHistory
Created September 19, 2019 20:39 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
<?php
function my_find_expired_events( $ids ) {
$args = array(
'post_type' => 'tribe_events',
'nopaging' => true,
'fields' => 'ids',
'meta_query' => array(
array(
@dylan-k
dylan-k / .htaccess
Created March 20, 2019 19:57 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@dylan-k
dylan-k / firstLast.sql
Created April 9, 2018 22:25 — forked from mrclay/firstLast.sql
MySQL: Extract last and first name(s) from a full "name" field (for Elgg)
SELECT
-- Assumed to be trimmed
name
-- Does name contain multiple words?
,(LOCATE(' ', name) = 0) AS hasMultipleWords
-- Returns the end of the string back until reaches a space.
-- E.g. "John Doe" => "Doe"
-- E.g. "Francis Scott Key" => "Key"