Skip to content

Instantly share code, notes, and snippets.

View stevewithington's full-sized avatar
⛑️
solving problems

Steve Withington stevewithington

⛑️
solving problems
View GitHub Profile
@stevewithington
stevewithington / docker-compose-drupal-postgres.yml
Last active April 21, 2025 17:47
Drupal with Postgres Docker Compose File
version: '2'
# Note: use the database service name `db` in the Host IP Address field ...
# Or, `docker container inspect {postgrescontainerid}` to obtain the IP Address needed for completing the Drupal setup screen.
services:
# Postgres
db:
image: postgres:9.6.5-alpine
restart: always
Continent_Name Continent_Code Country_Name Two_Letter_Country_Code Three_Letter_Country_Code Country_Number
Asia AS Afghanistan, Islamic Republic of AF AFG 4
Europe EU Albania, Republic of AL ALB 8
Antarctica AN Antarctica (the territory South of 60 deg S) AQ ATA 10
Africa AF Algeria, People's Democratic Republic of DZ DZA 12
Oceania OC American Samoa AS ASM 16
Europe EU Andorra, Principality of AD AND 20
Africa AF Angola, Republic of AO AGO 24
North America NA Antigua and Barbuda AG ATG 28
Europe EU Azerbaijan, Republic of AZ AZE 31
@stevewithington
stevewithington / VirtualBox-Guest-Additions.sh
Created December 18, 2012 13:49
Installing VirtualBox Guest Additions From Terminal
VBOX_VERSION=4.2.4
cd /tmp
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
mount -o loop,ro VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
sh /mnt/VBoxLinuxAdditions.run
umount /mnt
#rm VBoxGuestAdditions_$VBOX_VERSION.iso
unset VBOX_VERSION
@stevewithington
stevewithington / bash-ansi-variables-colorized-echo-output.md
Created April 16, 2021 14:26
Bash ANSI Variables for Colorized Echo Output

Bash ANSI Variables for Colorized Echo Output

I wanted to be able to make some messaging stand out while running Azure Pipeline Builds. This is ultimately what worked for me.

Example Usage

Some simple examples of how to use the variables listed below.

One Color for the Entire Line

@stevewithington
stevewithington / find-replace-sed.md
Last active June 27, 2024 15:19
Find & Replace within an Entire Directory or Git Repo with sed

Find & Replace within an Entire Directory or Git Repo with sed

If replacing within a directory:

grep -rl 'apples' /dir_to_search_under | xargs sed -i 's/apples/oranges/g'

Or, within an entire git repository:

@stevewithington
stevewithington / muraSaveImage.cfm
Last active June 20, 2024 10:51
Mura CMS : How To Dynamically Add Images or Photos To Content Items
<cfscript>
// This will NOT work unless you have 'allowlocalfiles=true' in /config/settings.ini.cfm
// read image info on local file for default value
try {
ir = ImageRead('steve-withington.jpg');
img = ir.source;
} catch(any e) {
img = '';
}
@stevewithington
stevewithington / dspNestedCategories.cfm
Last active June 11, 2024 17:57
Mura CMS : Display nested categories with links (only if the category has been set to allow content assignments)
<cfscript>
/**
* @parentID Category ParentID
*/
public any function dspNestedCategories(
string siteid='#variables.$.event('siteid')#'
, string parentID=''
, string keywords=''
, boolean activeOnly=false
, boolean InterestsOnly=false
@stevewithington
stevewithington / dbt_to_dbdiagram.rb
Created May 3, 2024 17:38 — forked from pcreux/dbt_to_dbdiagram.rb
Generate an ERD via dbdiagram.io from a dbt project.
#!/usr/bin/env ruby
# Generate a dbdiagram for dbdiagram.io from a dbt project.
#
# Usage:
# 1. Run `dbt docs generate` first.
# 2. Run `dbt_to_dbdiagram.rb`
# 3. Paste the output in https://dbdiagram.io/
require 'yaml'
require 'json'
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@stevewithington
stevewithington / refresh_power_bi_with_python_option_1.ipynb
Last active March 5, 2024 16:57
Refresh Power BI / Fabric with Python : Option 1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.