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
#!/bin/bash | |
# VS Code Server Setup Script for Ubuntu 24.04 | |
# This script installs VS Code CLI and sets up tunneling for remote connections | |
# Unlike code-server.sh which sets up web-based code-server, this creates a tunnel | |
# that can be accessed from other VS Code IDE instances remotely | |
set -e | |
# Function to print status messages |
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
#!/bin/bash | |
# Instructions for Ubuntu Server 24.04 | |
# Launch a VM with ports 22, 80, 443 accessible from the internet | |
# User a dns setting to point to public IP of the VM | |
# Login to the VM using ssh | |
# Execute the command below | |
# bash <(curl -fsSL https://gist.githubusercontent.com/vkhazin/de15691155f54739c572d29bbb47b890/raw) | |
# Access using a web-browser and the url specified during execution of shell script |
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
grant select on all tables in schema {schema_name} to {db_user}; | |
grant usage on schema {schema_name} to {db_user}; |
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
fields @message | |
| filter @message like 'Carlsberg' | |
| parse @message '"material":"*"' as material | |
| filter not isempty(material) | |
| display material, @message |
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
# Place the file in the root folder of git repos to sync | |
# Run the script: python3 ./git-pull-push.py source_remote target_remote branch_name | |
import os | |
import sys | |
errors = [] | |
def main(): | |
source_remote = sys.argv[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
cast(UNIX_SECONDS(PARSE_TIMESTAMP("%d/%b/%Y:%H:%M:%S %z", time)) as string) as time |
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
Get-NetAdapter | Where-Object {$_.InterfaceDescription -Match "Cisco AnyConnect"} | Set-NetIPInterface -InterfaceMetric 6000 |
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
# https://docs.microsoft.com/en-us/powershell/azure/authenticate-azureps?view=azps-5.6.0#password-based-authentication | |
# https://docs.microsoft.com/en-us/azure/cdn/cdn-manage-powershell#purgingpre-loading-cdn-assets | |
param ( | |
[string]$applicationId, | |
[string]$tenantId, | |
[string]$accessKey, | |
[string]$resourceGroupName, | |
[string]$profileName, | |
[string]$endpointName, |
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 "$USER ALL=(ALL) NOPASSWD:ALL" | sudo tee --append /etc/sudoers |
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
$AZFileShareURl = "tsqlbackup.file.core.windows.net" | |
$AZUserName = "Azure\tsqlbackup" | |
$AZPassword = "7RODyFgfsXx1nML/SfFifKL+ozoCVag89D8B/bCgTbDakqaB7gSVM41BzcF0uvRHugmHRMLYoPyecAzJGPzxrA==" | |
$BackupFileName = "sqlbackup\DBExport.bak" | |
$DownloadLocation = "f:\DBExport.bak" | |
$SQLServer = "VM2016" | |
$BackupFileLocation = "f:\DBExport.bak" | |
$DatabaseName = "DBTest" |
NewerOlder