Skip to content

Instantly share code, notes, and snippets.

View sistlm's full-sized avatar
💭
I may be slow to respond.

Sistla sistlm

💭
I may be slow to respond.
View GitHub Profile
@sistlm
sistlm / windows10activation
Created December 15, 2021 16:22
Activate Windows 10 without Any Activator
1. Open CMD as Administrator
2. Paste the following commands into the Cmd: One by one, follow the order.
cscript slmgr.vbs /ipk "SERIAL NUMBER HERE"
Replace SERIAL NUMBER HER with any of these, according your Windows 10 installation type.
Home/Core TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
Home/Core (Country Specific) PVMJN-6DFY6-9CCP6-7BKTT-D3WVR
Home/Core (Single Language) 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH
@sistlm
sistlm / fetch_function.js
Created December 15, 2021 16:27 — forked from Kagigz/fetch_function.js
fetch example (JS) for Azure functions
fetch(functionURL, {
method: 'POST',
headers: {
'x-functions-key':"Your Function Key/available in the Azure portal",
'Content-Type':'application/json'
},
body:JSON.stringify({
"filename":filename
})
})
@sistlm
sistlm / app.csproj
Created December 15, 2021 16:28
Example Azure Blob Storage client code
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Storage.Blobs" Version="12.4.4" />
</ItemGroup>
</Project>
@sistlm
sistlm / main.tf
Created December 15, 2021 16:29 — forked from MatthewJDavis/main.tf
Terraform example using Azure blob storage for backend state.
terraform {
required_providers {
azuread = {
version = "=1.6.0"
}
}
backend "azurerm" {
key = "msgraphapp.tfstate"
resource_group_name = "terraform-state-demo"
storage_account_name = "update-with-storage-account-name"
@sistlm
sistlm / create-azure-vm-powershell.ps1
Created December 15, 2021 16:30 — forked from itorian/create-azure-vm-powershell.ps1
Create Azure Virtual Machine using PowerShell
# Login
Login-AzureRmAccount
# Variables for common values
$location = "westeurope"
$resourceGroup = "demo-resgroup-0"
$vmName = "demovm-0"
$publicIP = "spublicip-1"
$subnet = "subnet-1"
$vnet = "vnet-1"
@sistlm
sistlm / lvn.md
Created December 15, 2021 16:38 — forked from mtds/lvn.md
Linux Virtual Networking

Virtual Networking on Linux

In the Linux Kernel, support for networking hardware and the methods to interact with these devices is standardized by the socket API:

                +----------------+
                |   Socket API   |
                +-------+--------+
                        |
User space              |
### Log into Azure ARM
Login-AzureRmAccount
### Choose subscription 'new' Azure
$subscription = (Get-AzureRmSubscription | Out-GridView -Title "Select the Azure subscription that you want to use ..." -PassThru).SubscriptionName
Select-AzureRmSubscription -SubscriptionName $subscription
Import-Module "C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.Network\AzureRM.Network.psd1"
##########################################################################
@sistlm
sistlm / install-openstack.sh
Created December 15, 2021 16:40 — forked from blipp/install-openstack.sh
Scripts to setup an virtual external network with OpenStack after a setup with packstack --allinone
#!/bin/bash
# see http://information-technology.web.cern.ch/book/cern-cloud-infrastructure-user-guide/advanced-topics/installing-openstack#icehouse
set -x
echo "set term=xterm" >> .vimrc
yum install -y etckeeper
etckeeper init
etckeeper commit
yum install -y http://rdo.fedorapeople.org/rdo-release.rpm
sed -i -e 's/priority.*/priority=1/g' /etc/yum.repos.d/rdo-release.repo
sed --in-place '/^exclude=libmongodb/d;s/^priority=/exclude=libmongodb,pymongo\*,mongodb\*,python-bson,python-webob,python-mako,python-webtest\npriority=/g' /etc/yum.repos.d/slc6-os.repo /etc/yum.repos.d/slc6-updates.repo /etc/yum.repos.d/slc6-extras.repo
@sistlm
sistlm / format-terraform-cli-args.py
Created December 15, 2021 16:42 — forked from martingutierrezg/format-terraform-cli-args.py
Python script - Azure DevOps - Format Terraform Command Line Arguments
#!/usr/bin/python3
import sys
import re
terraform_plan_command_str = ''.join(sys.argv[1:])
# terraform_plan_command_str = ""
plan_splits = terraform_plan_command_str.rpartition("false")
plan_first_split = plan_splits[0] + plan_splits[1]
plan_second_split = plan_splits[2]
@sistlm
sistlm / gist:03542fd52294ea6f3c0ae034b35a670b
Created December 15, 2021 16:43 — forked from mrlesmithjr/gist:72e23d0a0cceefef553b83b4fce5d06f
Example GitLab CI Pipeline using Terraform, etc.
---
# Most pre-req tooling, etc. is installed using jumphosts.yml playbook
variables:
ADMIN_EMAIL: mrlesmithjr@gmail.com
CLOUD_PROVIDER: Azure # Define Supported Cloud Provider (Azure)
GIT_CRYPT_ENABLED: "true" # Must be lowercase (true|false)
GIT_SUBMODULE_STRATEGY: recursive
ORGANIZATION: example_org
PROJECT_NAME: example_project
TERRAFORM_VERSION: 0.12.28