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 / 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
### 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 / 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              |
@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 / 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 / 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 / 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 / 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