This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Get-ItemPropertyValue -LiteralPath 'HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' -Name Release) -ge 528040 | |
## more magic values listed at: https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed#minimum-version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [master]; | |
SELECT r.session_id, | |
ms_running = DATEDIFF(ms, r.start_time, GETDATE()), | |
db = db_name(r.database_id), --schema = object_schema_name(t.objectid, r.database_id), | |
command_name = object_name(t.objectid, r.database_id), s.host_name, | |
r.status, r.command, | |
currently_running_statement = SUBSTRING(t.text, | |
r.statement_start_offset/2 + 1, | |
((CASE WHEN r.statement_end_offset = -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
api_key = '!!!' # Put your key in here, obviously | |
channel_id = 'UCH2s99kNN5m3_wXQ245OqsA' | |
url = 'https://www.googleapis.com/youtube/v3/channels?part=statistics&id=%s&key=%s' % (channel_id, api_key) | |
r = requests.get(url) | |
print r.json()['items'][0]['statistics']['subscriberCount'] |