Skip to content

Instantly share code, notes, and snippets.

@alexvy86
alexvy86 / log.txt
Created August 18, 2020 23:36
Terraform logs - fails to import Azure Traffic Manager resource
2020-08-18T16:00:59.444-0500 [DEBUG] plugin.terraform-provider-azurerm_v2.23.0_x5.exe: [DEBUG] Determining which Resource Providers require Registration
2020-08-18T16:00:59.444-0500 [DEBUG] plugin.terraform-provider-azurerm_v2.23.0_x5.exe: [DEBUG] All required Resource Providers are registered
2020/08/18 16:00:59 [TRACE] [walkImport] Exiting eval tree: provider.azurerm
2020/08/18 16:00:59 [TRACE] vertex "provider.azurerm": visit complete
2020/08/18 16:00:59 [TRACE] dag/walk: visiting "azurerm_traffic_manager_profile.traffic-manager (import id \"/subscriptions/<my-subscription-id>/resourcegroups/my-rg/providers/Microsoft.Network/trafficmanagerprofiles/my-traffic-manager-profile\")"
2020/08/18 16:00:59 [TRACE] dag/walk: visiting "data.azurerm_resource_group.resource_group"
2020/08/18 16:00:59 [TRACE] vertex "azurerm_traffic_manager_profile.traffic-manager (import id \"/subscriptions/<my-subscription-id>/resourcegroups/my-rg/providers/Microsoft.Network/trafficmanagerprofiles/my-traffic-manager-profile\")": start
@alexvy86
alexvy86 / stuff-to-move-out-of-C-drive.md
Last active July 16, 2020 03:31
Stuff to move out of the C:\ drive

Stuff to move out of the C:\ drive

This is a compilation of things that by default are saved to the C:\ drive but can be easily told to move somewhere else. It can help to minimize disk usage for SSDs (which the OS disk usually is). Mostly focused on development stuff, since that's mostly what I've seen occupying space in my drives, but I'll add other things as well.

npm package cache

Set the npm_config_cache environment variable to the new path (e.g. G:\AppData\Roaming\npm-cache)

Or run npm config set cache "<new-path>" --global .

Keybase proof

I hereby claim:

  • I am alexvy86 on github.
  • I am alexvy86 (https://keybase.io/alexvy86) on keybase.
  • I have a public key whose fingerprint is 8B92 0942 5ED6 F676 80FE CC2D 1AC5 F9C3 B669 67C4

To claim this, I am signing this object:

@alexvy86
alexvy86 / Deadlock debug trace flags
Created August 23, 2012 06:14
Turn on trace flags for deadlock debugging
DBCC TRACEON(1204,-1)
DBCC TRACEON(1222,-1)
DBCC TRACEON(3605,-1)
DBCC TRACESTATUS
@alexvy86
alexvy86 / SQL Server table size statistics
Created August 23, 2012 06:14
See row and size statistics for all tables in a DB in SQL Server
SET NOCOUNT ON
DBCC UPDATEUSAGE(0)
-- DB size.
EXEC sp_spaceused
-- Table row counts and sizes.
CREATE TABLE #t
(
@alexvy86
alexvy86 / SQL Server object lookup by text
Last active October 9, 2015 03:48
Look for DB objects with some text in them
DECLARE @textToLookFor VARCHAR(200)
SET @textToLookFor = 'InventoryTransaction'
SELECT * FROM INFORMATION_SCHEMA.ROUTINES
WHERE OBJECT_DEFINITION(OBJECT_ID(ROUTINE_SCHEMA + '.' + ROUTINE_NAME)) LIKE '%' + @textToLookFor + '%'
SELECT * FROM INFORMATION_SCHEMA.TABLES
WHERE OBJECT_DEFINITION(OBJECT_ID(TABLE_SCHEMA + '.' + TABLE_NAME)) LIKE '%' + @textToLookFor + '%'