This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start by installing Terraform on Ubuntu | |
# The best way to do this is by following the install instructions on the Hashicorp developer site | |
# https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli | |
# Hashicorp advise authenticating using the Azure CLI when running Terraform locally | |
# Install the Azure CLI | |
# https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt | |
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash | |
# Login to Azure. Authentication will be via a browser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This Gist is a list of resources and commands to accompany The Hackershack YouTube series. | |
# https://www.youtube.com/@hackershack | |
# How to make a website with Python and Django - STATIC FRONTEND ASSETS (E06) - https://www.youtube.com/watch?v=rzEXSEkS8gM | |
# For this attempt I am using Linux / Ubuntu and the demo is on a mac, so I will note any differences as I go along | |
# BASICS (E01) | |
# https://www.youtube.com/watch?v=rA4X73E_HV0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Containers | |
# Show running containers | |
docker ps | |
# Show all containers | |
docker ps --all | |
docker ps -a | |
# Show all container ids | |
docker ps -q | |
# Create a container |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compare branches | |
# Show name of files only | |
git diff [branch1] [branch2] --name-only | |
# Merge branches | |
# Merge with no auto commit | |
git merge [branch] --no-commit --no-ff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "\n*** CSV Scrub ***\n"; // Message console | |
$csvFile = $argv[1]; // Define $csvFile from Konsole argument | |
/* File */ | |
if (empty($csvFile)) { //Throw error if $csvFile not defined | |
echo "\n*** ERROR: Filename not specified ***\n"; // Message console | |
die(); | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('xdebug.var_display_max_depth', -1); | |
ini_set('xdebug.var_display_max_children', -1); | |
ini_set('xdebug.var_display_max_data', -1); | |
/** | |
* This code sample illustrates how to use BatchJobService to create a complete | |
* campaign, including ad groups and keywords. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
array (size=4) | |
0 => | |
array (size=2) | |
'screen_id' => string 'A0E6457F-EF4F-4BEF-811A-0ACE00AE6225' (length=36) | |
'name' => string 'Level 1 - Stalls' (length=16) | |
1 => | |
array (size=2) | |
'screen_id' => string 'A34D24F8-B1C5-4E26-A1FE-91A3C13A4F10' (length=36) | |
'name' => string 'Level 2 - Dress Circle' (length=22) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE [table] SET url = REPLACE (url, 'a', 'b') WHERE [column] LIKE '%alan%'; | |
-- Produces 'blbn' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE table AS t | |
SET t.id = ''; | |
SET @rank:=0; | |
update table AS t | |
set t.id =@rank:=@rank+1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysqldump -u [user] -p[password] database_name table_name > destination/backup_file.sql |
NewerOlder