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
DECLARE @TimeZone VARCHAR(50) | |
EXEC MASTER.dbo.xp_regread 'HKEY_LOCAL_MACHINE', | |
'SYSTEM\CurrentControlSet\Control\TimeZoneInformation', | |
'TimeZoneKeyName',@TimeZone OUT | |
SELECT @TimeZone | |
-- OR this snippet but I am not sure I trust it yet.... | |
DECLARE @TZ SMALLINT | |
SELECT @TZ=DATEPART(TZ, SYSDATETIMEOFFSET()) |
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
set TARGET_IP=78.24.135.113 | |
set NETWORK_INTERFACE_IP=10.100.197.60 | |
route add %TARGET_IP% mask 255.255.255.255 %NETWORK_INTERFACE_IP% metric 2 |
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
root@rapunzel:~# bluetoothctl -a | |
[NEW] Controller 74:F0:6D:EA:D2:14 rapunzel [default] | |
[NEW] Device 00:1F:20:91:C7:8C Logitech K810 | |
Agent registered | |
[Logitech K810]# remove 00:1F:20:91:C7:8C | |
[CHG] Device 00:1F:20:91:C7:8C ServicesResolved: no | |
Device has been removed | |
[CHG] Device 00:1F:20:91:C7:8C Connected: no | |
[DEL] Device 00:1F:20:91:C7:8C Logitech K810 | |
[bluetooth]# scan on |
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
DECLARE @dbname sysname, @days int | |
SET @dbname = NULL --substitute for whatever database name you want | |
SET @days = -50 --previous number of days, script will default to 30 | |
SELECT | |
rsh.destination_database_name AS [Database], | |
rsh.user_name AS [Restored By], | |
CASE WHEN rsh.restore_type = 'D' THEN 'Database' | |
WHEN rsh.restore_type = 'F' THEN 'File' | |
WHEN rsh.restore_type = 'G' THEN 'Filegroup' | |
WHEN rsh.restore_type = 'I' THEN 'Differential' |
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
<Connector port="8080" maxHttpHeaderSize="8192" | |
maxThreads="150" minSpareThreads="25" maxSpareThreads="75" | |
enableLookups="false" redirectPort="8443" acceptCount="100" | |
connectionTimeout="20000" disableUploadTimeout="true" | |
compression="on" | |
compressionMinSize="1024" | |
noCompressionUserAgents="gozilla, traviata" | |
compressableMimeType="text/html,text/xml"/> |
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
If you sync a calendar from a team or group and you want to sync it to google calendar do the following | |
1. From a browser go to google calenar and add the new calendar via URL (most likely) | |
2. Save and ensure you see some events from that team / group. | |
3. Now you want to see it on your iPhone/iPad | |
a. Go to https://calendar.google.com/calendar/syncselect | |
b. Check the calendar by name in the list you want to see on your mobile apps. | |
c. Save | |
4. Go to your phone or iPad and look at your calendar. You should see the new calendar populate within a few minutes. |
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
C:\Users\k.langer>cmdkey | |
Creates, displays, and deletes stored user names and passwords. | |
The syntax of this command is: | |
CMDKEY [{/add | /generic}:targetname {/smartcard | /user:username {/pass{:password}}} | /delete{:targetname | /ras} | /list{:targetname}] | |
Examples: |
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-EventLog -LogName "System" -Newest 100 -InstanceId 40960 | |
write-host "Press any key to continue..." | |
[void][System.Console]::ReadKey($true) |
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
$ ssh-keygen -t rsa -m PEM -b 4096 -C "mylogin@HOST" | |
OR the modern way | |
$ ssh-keygen -t ed25519 -C "[email protected]" |
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
// Official Microsoft Way | |
await Task.CompletedTask; | |
// Alternate Way | |
await Task.Delay(0); |