Skip to content

Instantly share code, notes, and snippets.

View s-belichenko's full-sized avatar

Stas B. s-belichenko

  • Russia, Mocsow
View GitHub Profile
@syahzul
syahzul / how-to-install-oci8-on-macos-10.15-catalina-with-php-7.3-7.4-homebrew.md
Last active May 10, 2024 20:22
How to install OCI8 on macOS 10.15 (Catalina) with PHP 7.3 or 7.4 (Homebrew)

How to install OCI8 on macOS 10.15 (Catalina) with PHP 7.3 or 7.4

Requirements

  • Homebrew
  • Command Line Tools for Xcode
  • PHP 7.3 or 7.4 via Homebrew

Preparation

@mohanpedala
mohanpedala / bash_strict_mode.md
Last active November 15, 2024 17:43
set -e, -u, -o, -x pipefail explanation
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active November 15, 2024 08:20
crack activate Office on mac with license file
@kloon
kloon / woocommerce-3.3-hide-uncetagorized-category.php
Created February 9, 2018 05:30
WooCommerce 3.3 Hide uncategorized category from shop
<?php
add_filter( 'woocommerce_product_subcategories_args', 'remove_uncategorized_category' );
/**
* Remove uncategorized category from shop page.
*
* @param array $args Current arguments.
* @return array
**/
function remove_uncategorized_category( $args ) {
$uncategorized = get_option( 'default_product_cat' );
@magnetikonline
magnetikonline / README.md
Last active April 30, 2024 15:48
Bash getopt long options with values usage example.

Bash getopt long options with values usage example

#!/bin/bash -e

ARGUMENT_LIST=(
  "arg-one"
  "arg-two"
  "arg-three"
)
@esamattis
esamattis / .gitignore
Created September 7, 2016 10:42 — forked from salcode/.gitignore
.gitignore file for WordPress - Bare Minimum Git
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
@geoffspink
geoffspink / rename_woocommerce_admin_menu.php
Created November 10, 2014 07:07
Rename the Admin Menu name for WooCommerce to the name of the website store.
<?php
add_action( 'admin_menu', 'rename_woocoomerce_admin_menu', 999 );
function rename_woocoomerce_admin_menu()
{
global $menu;
// Pinpoint menu item
$woo = recursive_array_search_php( 'WooCommerce', $menu );
@tinotriste
tinotriste / breadcrumbs-functions.php
Last active August 5, 2024 07:01
Wordpress: Breadcrumbs function
<?php
/*=============================================
= BREADCRUMBS =
=============================================*/
// to include in functions.php
function the_breadcrumb() {
$sep = ' > ';
@DavidWells
DavidWells / add-wordpress-settings-page.php
Created January 28, 2013 05:59
WordPress :: Add Settings Page with All Fields
<?php
/*
Plugin Name: Homepage Settings for BigBang
Plugin URI: http://www.inboundnow.com/
Description: Adds additional functionality to the big bang theme.
Author: David Wells
Author URI: http://www.inboundnow.com
*/
// Specify Hooks/Filters
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active November 9, 2024 08:57
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1