Skip to content

Instantly share code, notes, and snippets.

View a30001539's full-sized avatar
🏠
In office

Leif a30001539

🏠
In office
View GitHub Profile
@a30001539
a30001539 / idle.vbs
Created November 30, 2020 04:12
stop a windows machine going into screensaver
Dim objResult
Set objShell = WScript.CreateObject("WScript.Shell")
Do While True
objResult = objShell.sendKeys("{NUMLOCK}{NUMLOCK}")
WScript.Sleep(6000)
Loop
@a30001539
a30001539 / crash.log
Created October 9, 2020 01:23
tf crash trace log
2020/10/09 12:21:24 [INFO] Terraform version: 0.12.28
2020/10/09 12:21:24 [INFO] Go runtime version: go1.12.13
2020/10/09 12:21:24 [INFO] CLI args: []string{"/usr/local/bin/terraform", "import", "-input=true", "module.storage-account-edpCorpCommSa00.azurerm_storage_account.sa", "/subscriptions/82a17bd1-a2f3-482b-97ca-db137fa56970/resourceGroups/workspace-enterprise-data-corp-dev/providers/Microsoft.Storage/storageAccounts/edpcorpcommdevsa00"}
2020/10/09 12:21:24 [DEBUG] Attempting to open CLI config file: /Users/leif/.terraformrc
2020/10/09 12:21:24 Loading CLI configuration from /Users/leif/.terraformrc
2020/10/09 12:21:24 [DEBUG] checking for credentials in "/Users/leif/.terraform.d/plugins"
2020/10/09 12:21:24 [DEBUG] checking for credentials in "/Users/leif/.terraform.d/plugins/darwin_amd64"
2020/10/09 12:21:24 [INFO] CLI command args: []string{"import", "-input=true", "module.storage-account-edpCorpCommSa00.azurerm_storage_account.sa", "/subscriptions/82a17bd1-a2f3-482b-97ca-db137fa56970/resourceGroups
@a30001539
a30001539 / pipeline.yaml
Created March 11, 2020 01:50
azure devops yaml condition
strategy:
runOnce:
deploy:
steps:
- checkout: self
- task: AzurePowerShell@4
condition: eq(variables['SKIP_RESTORE'], 'False'))
displayName: Run only if the SKIP is set False
inputs:
@a30001539
a30001539 / access.sql
Created July 24, 2019 01:38
add uer to DB
EXEC sp_addrolemember db_datawriter,[[email protected]]
EXEC sp_addrolemember db_datareader,[[email protected]]
GRANT EXECUTE on SCHEMA :: etl to [[email protected]]
GRANT EXECUTE on DATABASE :: edpdevdb to [[email protected]]
GRANT EXECUTE on SCHEMA :: "external" to [[email protected]]
GRANT EXECUTE on SCHEMA :: staging to [[email protected]]
GRANT CREATE PROCEDURE on DATABASE :: edpdevdb to [[email protected]]
GRANT CREATE TABLE on DATABASE :: edpdevdb to [[email protected]]
GRANT ALTER ANY EXTERNAL FILE FORMAT to [[email protected]]
GRANT ALTER ANY EXTERNAL DATA SOURCE to [[email protected]]
@a30001539
a30001539 / access.sql
Created July 23, 2019 01:37
add user and grant rw access to table
create user [[email protected]] from external provider;
grant select on schema :: mktcampaign to [[email protected]] - READ
grant alter on schema :: mktcampaign to [[email protected]] - WRITE