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
@wojtha
wojtha / gist:1852991
Created February 17, 2012 12:08
GIT: Remove tag from the remote repository
git tag -d 12345
git push origin :refs/tags/12345
/* That will remove '12345' from the remote repository. */
/* http://nathanhoad.net/how-to-delete-a-remote-git-tag */
@akost
akost / convert.sh
Created April 4, 2012 19:06
Bash script for recursive file convertion windows-1251 --> utf-8
#!/bin/bash
# Recursive file convertion windows-1251 --> utf-8
# Place this file in the root of your site, add execute permission and run
# Converts *.php, *.html, *.css, *.js files.
# To add file type by extension, e.g. *.cgi, add '-o -name "*.cgi"' to the find command
find ./ -name "*.php" -o -name "*.html" -o -name "*.css" -o -name "*.js" -type f |
while read file
do
@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
@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
@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 = ' > ';
@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 );
@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
@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"
)
@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' );
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active November 15, 2024 08:20
crack activate Office on mac with license file