I hereby claim:
- I am n8kowald on github.
- I am n8kowald (https://keybase.io/n8kowald) on keybase.
- I have a public key ASBo4VQ3KwN5Xys75sMXV2ez3KFlkEXdUCT7IjlzZMxYbAo
To claim this, I am signing this object:
# Compress text, html, javascript, css, xml: | |
<IfModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/text | |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE text/javascript | |
AddOutputFilterByType DEFLATE application/xml | |
AddOutputFilterByType DEFLATE application/xhtml+xml |
<?php | |
// --- Create a shortcode | |
// @Usage: [shortcode_name count="1"] | |
function theme_shortcode_add_name($args) { | |
$html = ''; | |
$count = !empty($args['count']) ? $args['count'] : 5; | |
return $html; | |
} | |
add_shortcode( 'shortcode_name', 'theme_shortcode_add_name' ); |
<?php | |
/* Email Subscribers & Newsletters - by Icegram (https://wordpress.org/plugins/email-subscribers) | |
These functions allow you to subscribe/unsubscribe a user to an email group without using a signup form. */ | |
/** | |
* Subscribe a user to a given newsletter group | |
* | |
* @param $user_id | |
* @param $group | |
* @throws Exception |
-- Delete all of posts of custom post type | |
DELETE FROM `wp_posts` WHERE `post_type` = 'post-type'; | |
-- Delete all unpublished of custom post type | |
DELETE FROM `wp_posts` WHERE `post_status` = 'draft' and `post_type` = 'post-type'; |
# Choose from an array of strings | |
echo "Please choose the environment" | |
local envs=('staging' 'pre-live' 'live') | |
select env in "${envs[@]}" | |
do | |
case $env in | |
"staging") break;; | |
"pre-live") break;; | |
"live") break;; | |
"Quit") break;; |
I hereby claim:
To claim this, I am signing this object:
# GIT WORKFLOW | |
# (c) Luke Maciak | |
# Initialize: | |
git init | |
# Check Out: | |
git clone username@host:/path/to/repository | |
# Add Origin: |
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
# This is a simple example Widget, written in CoffeeScript, to get you started | |
# with Übersicht. For the full documentation please visit: | |
# | |
# https://github.com/felixhageloh/uebersicht | |
# | |
# You can modify this widget as you see fit, or simply delete this file to | |
# remove it. | |
# this is the shell command that gets executed every time this widget refreshes | |
command: "echo $(whoami) && TZ=Australia/Adelaide date && TZ=Australia/Melbourne date" |
/* RULES */ | |
- Variable and function declarations are hoisted (names are moved to the top of their current scope) by the JavaScript interpreter. | |
- Variable initialisations are not moved. | |
- Only functions create new scope | |
- Function Declarations are officially prohibited within non-function blocks (such as if) | |
var a; // variable declaration | |
a = 1; // variable initialisation |