Skip to content

Instantly share code, notes, and snippets.

View rchaganti's full-sized avatar
Slow to respond.

Ravikanth C rchaganti

Slow to respond.
View GitHub Profile
@rchaganti
rchaganti / tzDiff.ps1
Last active March 20, 2023 05:04
tzDiff.ps1
View tzDiff.ps1
param
(
[Parameter(Mandatory = $true)]
[String[]]
$Timezone,
[Parameter()]
[Datetime]
$Target
)
View push-image-docker.sh
# Create a tar gz of the layer
cd ~/hello-cloud/imageLayer
tar -czvf ../hello-cloud.tar.gz *
cd ~/hello-cloud
# Obtain digests and diff IDs
LAYERDIGEST=$(sha256sum < hello-cloud.tar.gz | cut -d' ' -f1)
LAYERDIFF=$(gunzip < hello-cloud.tar.gz | sha256sum | cut -d' ' -f1)
LAYERSIZE=$(ls -l hello-cloud.tar.gz | awk '{print $5}')
@rchaganti
rchaganti / downloadTerraform.ps1
Created October 13, 2020 09:18
Download and Install Terraform - Windows (PowerShell)
View downloadTerraform.ps1
[CmdletBinding(DefaultParameterSetName='Version')]
param
(
[Parameter(ParameterSetName='Latest', Mandatory = $true)]
[Parameter(ParameterSetName='Version', Mandatory = $true)]
[String]
$SaveToPath,
[Parameter(ParameterSetName='Version', Mandatory = $true)]
[String]
View gist:b15475bb628b88cd3e905564427cf531
Create a program that uses shorthand declaration to declare variables of types `int`, `string`, and `bool` and assigns the values 10, 'hello', and true respectively.
What happens when you use the statement `fmt.Println(i == s)`.
View gist:687707e99bb63cb59bdc37bf9e8f7b79
Create a program that declares two variables -- an integer and a floating pointing type.
Perform multiplication of these values and print the result using `Println` function.
@rchaganti
rchaganti / d3-swapVariables.go
Created August 11, 2020 11:16
D3 Swap Variables
View d3-swapVariables.go
Create a program that declares two integer variables i and j and assigns values 10 and 30.
Print the values of these variables. Add an expression to swap the values of the variables using assignment operator.
Finally, print the values of the variable values after swapping.
@rchaganti
rchaganti / d3-helloworld.go
Last active August 11, 2020 11:15
Day 3 Hello World
View d3-helloworld.go
In the first exercise, update the hello world program you create in the [last part](https://ravichaganti.com/blog/get-set-go-first-program/)
to add a variable `fName` and initialize it with your name as the value.
Finally, print the statement Hello, fName to the screen.
@rchaganti
rchaganti / ex1
Created August 4, 2020 16:01
Day 2 - Exercise 1
View ex1
Write a program that prints "I ❤ Golang!". You don't have to use anything more than what you learned today.
Comment your code to explain different statements / keywords.
@rchaganti
rchaganti / d2-helloworld.go
Last active August 4, 2020 15:37
Hello World in Go Language
View d2-helloworld.go
package main
/*
all imports are specified right after package declaration
*/
import "fmt"
// main function is the entry point
func main() {
fmt.Println("Hello World, let us Get Set GO!") //this is a print statement
View azKVDepends.azrm.json
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"objectId": {
"type": "String"
},
"secretName" : {
"type" : "String"
},