Skip to content

Instantly share code, notes, and snippets.

View himannetwork's full-sized avatar
🎯
Focusing

Himanshu Siresiya himannetwork

🎯
Focusing
View GitHub Profile
Commands
------------
1. Build Docker Image
docker build -t test .
2. Run container /w image
docker run -d --publish 8888:5000 test
3. Login to ECR
aws ecr get-login-password --region REGIONHERE!!!! | docker login --username AWS --password-stdin ACCOUNTIDHERE!!!!.dkr.ecr.REGIONHERE!!!.amazonaws.com
@sakamaki-kazuyoshi
sakamaki-kazuyoshi / AmazonAuroraTestEnvironment.yml
Created April 22, 2020 05:45
Amazon Aurora test environment
AWSTemplateFormatVersion: '2010-09-09'
Description: Amazon Aurora test environment
# ------------------------------------------------------------#
# Input Parameters
# ------------------------------------------------------------#
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
- Label:
default: "Global Configuration"
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: myboot
name: myboot
spec:
replicas: 1
selector:
matchLabels:
@adameubanks
adameubanks / PyDa.py
Created April 11, 2020 01:21
Code for the video where we build a Jarvis like virtual assistant in python 3
import wolframalpha
client = wolframalpha.Client("lilpumpsaysnopeeking")
import wikipedia
import PySimpleGUI as sg
sg.theme('DarkPurple')
layout =[[sg.Text('Enter a command'), sg.InputText()],[sg.Button('Ok'), sg.Button('Cancel')]]
window = sg.Window('PyDa', layout)
@cmendible
cmendible / kubectl_ubuntu_wsl.sh
Created November 16, 2019 22:02
Install kubectl on ubuntu (WSL) and use kubectl config from Windows
#!/bin/bash
# Receives your Windows username as only parameter.
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.16.0/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
windowsUser=$1
@trajano
trajano / settings.json
Last active June 21, 2024 11:27
Windows Terminal (with git bash and additional shortcuts)
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{00000000-0000-0000-ba54-000000000002}",
"launchMode": "maximized",
"theme": "light",
"useTabSwitcher": false,
"tabWidthMode": "titleLength",
"profiles": {
@coreyasmith
coreyasmith / Create-JSSContentDeliveryWdp.ps1
Last active November 13, 2019 10:44
PowerShell snippet and ARM templates for deploying Sitecore modules to XP Scaled environments.
# Make sure to import `Sitecore.Cloud.Cmdlets.dll` and not `Sitecore.Cloud.Cmdlets.psm1`
Import-Module C:\Sitecore\sat\tools\Sitecore.Cloud.Cmdlets.dll
$packagePath = "C:\Sitecore\Packages"
Remove-SCDatabaseOperations `
-Path "$packagePath\Sitecore JavaScript Services Tech Preview Server 9.0.1 rev. 180724.scwdp.zip" `
-Destination $packagePath `
-Verbose `
-Force
@coreyasmith
coreyasmith / New-TrustedSelfSignedCertificate.ps1
Last active January 29, 2023 13:31
Create a trusted, self-signed certificate with PowerShell. Inspiration comes from Dominick Baier's (@leastprivilege) "Web API v2 Security" course on Pluralsight: https://www.pluralsight.com/courses/webapi-v2-security.
Param(
[Parameter(Mandatory=$true)]
[string[]]$DnsName,
[DateTime]$CertExpirationDate = (Get-Date).AddYears(5),
[string]$PersonalCertStoreLocation = "Cert:\LocalMachine\My",
[string]$HashAlgorithm = "SHA512",
[string]$RootCertSubject = "CN=DevRoot",
[string]$RootCertStoreLocation = "Cert:\LocalMachine\Root",
[DateTime]$RootCertExpirationDate = (Get-Date).AddYears(20)
)
@coreyasmith
coreyasmith / CreateContributorPrincipal.ps1
Last active March 1, 2020 15:46
PowerShell script to create Service Principal with Contributor role in Azure Active Directory
param
(
[Parameter(Mandatory=$true, HelpMessage="Enter Azure Tenant Domain")]
[string] $tenant,
[Parameter(Mandatory=$true, HelpMessage="Enter Azure Subscription ID")]
[string] $subscriptionId,
[Parameter(Mandatory=$true, HelpMessage="Provide a unique display name for SPN application")]
[string] $appDisplayName,
@sjparkinson
sjparkinson / RDS-Aurora-CloudFormation-Example.yaml
Last active May 10, 2022 10:43
A basic CloudFormation template for an RDS Aurora cluster.
---
AWSTemplateFormatVersion: 2010-09-09
Description: >
A basic CloudFormation template for an RDS Aurora cluster.
Parameters:
DatabaseUsername:
AllowedPattern: "[a-zA-Z0-9]+"
ConstraintDescription: must be between 1 to 16 alphanumeric characters.