Skip to content

Instantly share code, notes, and snippets.

View shayhurley's full-sized avatar
💭
Life is like Tetris, achievements disappear, failures stick around forever.

Shay Hurley shayhurley

💭
Life is like Tetris, achievements disappear, failures stick around forever.
View GitHub Profile
@altercation
altercation / dataview_proj_sample.md
Last active December 29, 2023 22:54
Active Projects - Obsidian Dataview Sample - Ethan Schoonover
TABLE WITHOUT ID

	choice(striptime(date(today)) - striptime(file.mtime) <= dur("2 days"),
			"<span style=color:#859900;>●</span> ",
			choice(striptime(date(today)) - striptime(file.mtime) < dur("1 week"),
				"<span style=color:#b58900;>◐</span> ",
				"<span style=color:#dc322f;>⊗</span> "
			)
			) +
author title date description tags
Hugo Authors
Markdown Syntax Guide (modified es)
2023-01-09
Sample article showcasing basic Markdown syntax and formatting for HTML elements.
markdown
css
html
themes

Sample Markdown syntax file, modified from Hugo source by ES for Markdown editor comparison.

IAM Policies
---
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "secretsmanager:GetSecretValue",
"Resource": "*"
@geddski
geddski / Brewfile
Last active November 13, 2022 13:28
Dave Geddes' Brewfile for awesome mac automation
cask_args appdir: "/Applications"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-drivers"
tap "homebrew/cask-fonts"
tap "homebrew/core"
brew "fish"
brew "git"
brew "httpie"
brew "github/gh/gh"
@akarzim
akarzim / exa-aliases.zsh
Created March 20, 2018 16:07
Exa ZSH aliases
alias l='exa -1a' # Lists in one column, hidden files.
alias ll='exa -l' # Lists human readable sizes.
alias lr='ll -R' # Lists human readable sizes, recursively.
alias la='ll -a' # Lists human readable sizes, hidden files.
alias lm='la | "$PAGER"' # Lists human readable sizes, hidden files through pager.
alias lx='ll --sort=Extension' # Lists sorted by extension (GNU only).
alias lk='ll --sort=size -r' # Lists sorted by size, largest last.
alias lt='ll --sort=modified -r' # Lists sorted by date, most recent last.
alias lc='lt -m' # Lists sorted by date, most recent last, shows change time.
alias lu='lt -u' # Lists sorted by date, most recent last, shows access time.
@schmich
schmich / ducky.md
Last active April 5, 2024 14:20
Programming media keys on the Ducky One 2 Skyline

Programming Media Keys on the Ducky One 2 Skyline

To use media keys on the Ducky One 2 Skyline, you must record a macro to bind the media function to a hotkey combination, i.e. Fn plus some key.

Example

Important: In the instructions below, "Press X+Y+Z" means press and hold key X, press and hold key Y, press and hold key Z in that order, and then release all three.

As an example, to bind Fn+PgUp to the play/pause media function:

/**
*
* Gulpfile setup
*
* @since 1.0.0
* @authors Ahmad Awais, @digisavvy, @desaiuditd, @jb510, @dmassiani and @Maxlopez
* @package neat
* @forks _s & some-like-it-neat
*/
@reediredale
reediredale / gist:7e8f1f7ebf2ee61611cb
Created November 24, 2014 01:38
Gravity Forms Datepicker No Weekends
<script>
jQuery(document).bind('gform_post_render', function(){
// destroy default Gravity Form datepicker
jQuery("#input_2_3").datepicker('destroy');
// create new custom datepicker
var oneWorkingDays = new Date();
var adjustments = [0, 1, 1, 1, 1, 1, 0]; // Offsets by day of the week
oneWorkingDays.setDate(oneWorkingDays.getDate() + 1 + adjustments[oneWorkingDays.getDay()]);
jQuery("#input_2_3").datepicker({ beforeShowDay: jQuery.datepicker.noWeekends, minDate: '+1d', gotoCurrent: true, prevText: '', showOn: 'both', buttonImage: '/wp-content/plugins/gravityforms/images/calendar.png', buttonImageOnly: true });
@richardW8k
richardW8k / rw-gf-age-calculation.php
Last active April 24, 2019 06:14
calculate age from date field when age modifier specified on merge tag e.g. {Date of Birth:10:age}
<?php
class RW_GF_Age_Calculation {
public function __construct() {
add_action( 'init', array( $this, 'init' ) );
}
function init() {
if ( ! class_exists( 'GFForms' ) || ! property_exists( 'GFForms', 'version' ) && version_compare( GFForms::$version, '1.9', '>=' ) ) {
@mackensen
mackensen / gulpfile.js
Created October 21, 2014 15:35
This is an example gulpfile for managing a WordPress theme with a custom (non-LESS) CSS stylesheet. It includes tools for bumping the version and updating the version references.
// List of modules used.
var gulp = require('gulp'),
bump = require('gulp-bump'), // Generates new version.
argv = require('yargs')
.default('release', 'patch')
.argv, // CLI parser.
fs = require('fs'), // Used by bump.
semver = require('semver'), // Used by bump.
git = require('gulp-git'), // Git wrapper.
jshint = require('gulp-jshint'), // Lints JS.