Skip to content

Instantly share code, notes, and snippets.

View drinkmaker's full-sized avatar
🏠
Working from home

Alexander Khmelnitskiy drinkmaker

🏠
Working from home
View GitHub Profile
@qumberrizvi
qumberrizvi / bitbucket-pipelines.yml
Last active September 11, 2023 06:30
Bitbucket Pipelines CI/CD: SSH into a server to git pull without conflict. Avoid failure when auto merge tries to open editor for commit message.
# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: php:7.1.29
pipelines:
default:
- step:
name: Deploy to dev
@hansschuijff
hansschuijff / install-wp-plugins.php
Last active January 26, 2025 19:41 — forked from squarestar/install-wp-plugins.php
Programmatically install and activate wordpress plugins
<?php
/**
* Plugin Name: Activate required plugins.
* Description: Programmatically install and activate plugins based on a runtime config.
* Version: 1.0
* Author: Hans Schuijff
* Author URI: http://dewitteprins.nl
* License: MIT
* License URI: http://www.opensource.org/licenses/mit-license.php
*/
@miguelmota
miguelmota / external_link_arrow.txt
Last active April 15, 2025 09:19
Unicode UTF-8 external link arrow symbol (closest thing to it)
@Rahmon
Rahmon / get_post_categories.php
Last active June 21, 2023 11:43
Get the post categories preserving the hierarchical order (WordPress)
<?php
/**
* Get the post categories preserving the hierarchical order
*
* This function returns an array with the following structure
*
* [
* [parent_term_id] => [
* [children] => [
* [child_term_id] => [
@akingdom
akingdom / editable-dropdown.html
Last active September 5, 2024 17:36
Example of a basic editable HTML dropdown (SELECT menu).
<html>
<!--
This replaces the SELECT dropdown menu with an editable INPUT textbox,
when the last ('other') option is selected from the list.
Note that this may not be a good fit when supplying both display values and raw values,
as evidenced by the 'spanish' option.
By Andrew Kingdom (C) 2023 all rights reserved. MIT License.
-->