Skip to content

Instantly share code, notes, and snippets.

View timnolte's full-sized avatar

Tim Nolte timnolte

View GitHub Profile
@zircote
zircote / reports.txt
Created May 10, 2011 18:39
phpcs report types
phpcs --standard=tests/build/phpcs.xml --report=summary .
PHP CODE SNIFFER REPORT SUMMARY
--------------------------------------------------------------------------------
FILE ERRORS WARNINGS
--------------------------------------------------------------------------------
/usr/local/zend/apache2/htdocs/project/application/Bootstrap.php 1 4
...2/htdocs/Project/application/controllers/ActivityController.php 3 1
...
@xuanlongma
xuanlongma / pandoc_multi_input.md
Last active May 1, 2024 19:18
Combine multiple input files when using Pandoc

If multiple input files are given, pandoc will concatenate them all (with blank lines between them) before parsing. -- from Pandoc website

Pandoc command: pandoc -s input1.md input2.md input3.md -o output.html

@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active June 18, 2024 05:42
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh key
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
eval "$(ssh-agent -s)"
@hlashbrooke
hlashbrooke / function.php
Last active December 13, 2023 12:19
WooCommerce - Check if you are running a specified WooCommerce version (or higher)
<?php
function woocommerce_version_check( $version = '2.1' ) {
if ( function_exists( 'is_woocommerce_active' ) && is_woocommerce_active() ) {
global $woocommerce;
if( version_compare( $woocommerce->version, $version, ">=" ) ) {
return true;
}
}
return false;
}
@mathetos
mathetos / image-upload-field-custom-taxonomy
Created September 20, 2014 21:37
Add Image Upload Field to Custom Taxonomy
<?php
/* Add Image Upload to Series Taxonomy */
// Add Upload fields to "Add New Taxonomy" form
function add_series_image_field() {
// this will add the custom meta field to the add new term page
?>
<div class="form-field">
<label for="series_image"><?php _e( 'Series Image:', 'journey' ); ?></label>
@kevin39
kevin39 / HAPROXY LDAP SETTINGS - WINDOWS COMPATIBLE
Last active March 14, 2022 21:29
HAProxy ldap-check compatible with Windows Server / Active Directory
# Note : Found somewhere on internet... Source lost
backend ldap_balancer
mode tcp
balance roundrobin
server SERVER_NAME SERVER_ADDR:389 maxconn 100 check
option tcpka
timeout server 2s
timeout connect 1s
# Below, ldap check procedure :
option tcp-check
@Page-Carbajal
Page-Carbajal / git-repo-to-wordpress-svn.md
Last active October 25, 2019 16:56
Publishing a Git Repository to WordPress with SVN

From a Git Repository to WordPress SVN

Well this is kind of fun right. Specially since must of us have not used SVN for over 10 years.

Lets do this. Our objective here is to create a common codebase for both SVN and Git.

Process for empty SVN Project

Doing this is not that complicated

@plasticbrain
plasticbrain / gulpfile.js
Last active February 13, 2024 14:31
gulp.js task to deploy code to remote servers
/*******************************************************************************
* Description:
*
* Gulp file to push changes to remote servers (eg: staging/production)
*
* Usage:
*
* gulp deploy --target
*
* Examples:
@cvan
cvan / set-up-chromium-keys.md
Last active June 14, 2024 14:29
Launch Chromium with API Keys on Mac OS X and Windows

Last Updated: March 2023

IMPORTANT: Ignore the out-of-date steps below for getting Chromium keys.

Instead, read this up-to-date guide (Jan 2023) written by @LearningToPi.

P.S. Thank you to every contributor below who provided tips over the years on what should be a straightforward process: setting up Chromium for local development.

Long live the web!

@huytd
huytd / .gitconfig
Created August 4, 2016 16:26
Use neovim as diff tool
[merge]
tool = vimdiff
[mergetool]
prompt = true
[mergetool "vimdiff"]
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[difftool]
prompt = false
[diff]
tool = vimdiff