Skip to content

Instantly share code, notes, and snippets.

View markhbrock's full-sized avatar

Mark markhbrock

  • [maak it]
  • Amsterdam
View GitHub Profile
@hn-support
hn-support / change_magento1_base_urls_to_https.py
Last active March 29, 2021 09:59
Change all base_urls of your Magento 1 live shop to https on hypernode
#!/usr/bin/env python
"""
Set the base-urls for your Magento 1 installation to support only https.
To use, download the file and make it executable. Then run:
./change_magento1_base_urls_to_https.py
After use, check your base-urls by issuing:
n98-magerun sys:store:config:base-url:list
This script requires n98-magerun.
@harding
harding / instructions.md
Last active January 19, 2026 20:24
Working With Multiple Repositories On GitHub

Working With Multiple Repositories On GitHub

Most projects on GitHub have a main repository that's the focal point of activity. For example, the Example organization has the Example.com repository:

https://github.com/example/example.com

Developers of Example.com typically call this the 'upstream' repository. We'll come back to it in a moment.

@blackfalcon
blackfalcon / git-feature-workflow.md
Last active May 4, 2026 08:28
Git basics - a general workflow

Git-workflow vs feature branching

When working with Git, there are two prevailing workflows are Git workflow and feature branches. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited, and the focus of this article.

If you are new to Git and Git-workflows, I suggest reading the atlassian.com Git Workflow article in addition to this as there is more detail there than presented here.

I admit, using Bash in the command line with the standard configuration leaves a bit to be desired when it comes to awareness of state. A tool that I suggest using follows these instructions on setting up GIT Bash autocompletion. This tool will assist you to better visualize the state of a branc

@paulferrett
paulferrett / imagick_average_colour.php
Created December 23, 2013 14:40
This function will get the average colour of an image file using PHP and Image Magick using the IMagick extension.
<?php
/**
* Get the average pixel colour from the given file using Image Magick
*
* @param string $filename
* @param bool $as_hex Set to true, the function will return the 6 character HEX value of the colour.
* If false, an array will be returned with r, g, b components.
*/
function get_average_colour($filename, $as_hex_string = true) {