Skip to content

Instantly share code, notes, and snippets.

View oneblackcrayon's full-sized avatar

Frederick Polk oneblackcrayon

View GitHub Profile
@oneblackcrayon
oneblackcrayon / config.conf
Created March 15, 2020 07:30
Neofetch Generated Config File
# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
print_info() {
info title
info underline
info "OS" distro
info "Host" model
info "Kernel" kernel
info "Uptime" uptime
@oneblackcrayon
oneblackcrayon / functions.php
Created February 6, 2020 05:00 — forked from Tusko/functions.php
WP Ajax search (ACF included)
<?php
/* Wordpress Custom Search by title, ACF, post_meta */
// Wordpress ?s= redirect to /search/
function wpa_search_redirect() {
global $wp_rewrite;
if (!isset($wp_rewrite) || !is_object($wp_rewrite) || !$wp_rewrite->using_permalinks()) { return; }
$search_base = $wp_rewrite->search_base;
if (is_search() && !is_admin() && strpos($_SERVER['REQUEST_URI'], "/{$search_base}/") === false) {
wp_redirect(home_url("/{$search_base}/" . urlencode(get_query_var('s'))));
@oneblackcrayon
oneblackcrayon / webpack.config.js
Created December 11, 2019 21:45 — forked from lpk3nny/webpack.config.js
Current webpack config
var path = require('path');
var fs = require("fs");
var xmldoc = require('xmldoc');
var _ = require('lodash');
var webpack = require('webpack');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
var c = require(path.join(__dirname, './gulp/config'));
var prod = 'production' === process.env.NODE_ENV;
@oneblackcrayon
oneblackcrayon / Date-Select-Markup.html
Created December 6, 2019 21:34 — forked from aleksblago/Date-Select-Markup.html
Markup: Select options for Month, Day, and Year.
<span>
<select name="month">
<option value="January">January</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
//
// Resposive spacer classes
// --------------------------------------------------
// Margin properties to cycle through
$margin-properties: (
mt: margin-top,
mb: margin-bottom,
my: margin,
ml: margin-left,
@oneblackcrayon
oneblackcrayon / webpack.config.js
Created September 5, 2019 19:46 — forked from wpscholar/webpack.config.js
Get started with WebPack in WordPress today!
'use strict';
const autoprefixer = require('autoprefixer');
const browsers = require('@wordpress/browserslist-config');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const path = require('path');
const webpack = require('webpack');
module.exports = function (env, options) {
@oneblackcrayon
oneblackcrayon / responsive-video.css
Created August 23, 2019 21:27 — forked from jaicab/responsive-video.css
Pure CSS solution for embed videos with an aspect ratio of 16:9
.video-container {
position: relative;
padding-bottom: 56.25%; /*16:9*/
padding-top: 30px;
height: 0;
overflow: hidden;
}
.video-container iframe,
.video-container object,
{
"$jason": {
"title": "Territory Manager",
"theme": "#474747",
"body": {
"action": {
"trigger": "$default"
},
"sections": [{
"items": [{
@oneblackcrayon
oneblackcrayon / 01-Packages.md
Created August 18, 2019 02:39 — forked from aubinlrx/01-Packages.md
Sublime Text Packages
@oneblackcrayon
oneblackcrayon / Rubbish\2019-05-06\settings.json
Created August 8, 2019 03:27
Visual Studio Code Settings Sync Gist
{
"ConEmu.path": "C:\\Program Files\\ConEmu\\ConEmu64.exe",
"[html]": {
"editor.foldingStrategy": "indentation",
"editor.fontFamily": "GT Walsheim Light",
"editor.fontSize": 19,
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.wordWrap": "off",
"editor.wrappingIndent": "same"