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
# -------------------------------------------------- | |
# -- Windows/System settings | |
# -------------------------------------------------- | |
# Settings: | |
# System: | |
# Notifications & actions: | |
# Show me the Windows welcome experience...: Uncheck | |
# Suggest ways I can finish setting up my device...: Uncheck | |
# Get tips, tricks, and suggestions...: Uncheck | |
# Multitasking: |
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
# Dark Theme | |
$file = gi "${env:ProgramFiles(x86)}\Microsoft SQL Server Management Studio 18\Common7\IDE\ssms.pkgundef"; ($file | gc) -Replace '(.*{1ded0138-47ce-435e-84ef-9ec1f439b749})', '//$1' | Out-File $file; | |
# Query execution settings | |
$ssmsUserSettingsFile = "$($env:APPDATA)\Microsoft\SQL Server Management Studio\18.0\UserSettings.xml"; | |
$newXml = "<Element><Key><int>-1</int></Key><Value><string /></Value></Element> | |
<Element><Key><int>3</int></Key><Value><string /></Value></Element> | |
<Element><Key><int>4</int></Key><Value><string /></Value></Element> | |
<Element><Key><int>5</int></Key><Value><string>USE </string></Value></Element> | |
<Element><Key><int>6</int></Key><Value><string>SELECT FORMAT(COUNT(*),'N0') FROM </string></Value></Element> | |
<Element><Key><int>7</int></Key><Value><string>SELECT TOP(100) * FROM </string></Value></Element> |
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
function Set-ForegroundWindow { | |
[CmdletBinding()] | |
param ( | |
[Parameter(ValueFromPipeline)][string]$ProcessName | |
) | |
$type = ' | |
using System; | |
using System.Runtime.InteropServices; | |
public class WinAp { |
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
* | |
!Microsoft.*_profile.ps1 | |
!.gitignore |
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
service: media_player.play_media | |
target: | |
device_id: b9e3064654ed6eb45dd434c508d656a3 | |
data: | |
media_content_type: "audio/mp3" | |
media_content_id: "media-source://media_source/local/filename.mp3" |
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
% Standard loan forumula | |
P=\begin{cases} | |
\frac{r(PV)}{1-(1+r)^{-n}} &\text{if }r\neq0\\\\ | |
\;\;\;\;\;\frac{PV}{n} &\text{if }r=0 | |
\end{cases} | |
% Finance Cost - Using Payment and Loan Amount | |
FC=\frac{P}{PV} | |
% Finance Cost - Using Rate and Term |
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 @VIN VARCHAR(17) = '3FA6PQHR5DR24649O' --VIN with invalid characters test | |
-- DECLARE @VIN VARCHAR(17) = '3FA6P0HR5DR246490' --VIN with invalid check digit test | |
DECLARE @VIN VARCHAR(17) = '1FTFX1E58LKF43489'; --Valid VIN test | |
DECLARE @VINCheck TABLE (Letter CHAR(1) NOT NULL, [Value] TINYINT NOT NULL); | |
INSERT INTO @VINCheck | |
VALUES ('A',1),('B',2),('C',3),('D',4),('E',5),('F',6),('G',7),('H',8), |
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 OBJECT_ID('tempdb..#gaps','U') IS NOT NULL DROP TABLE #gaps; --SELECT * FROM #gaps | |
CREATE TABLE #gaps ( | |
ID int NOT NULL IDENTITY, | |
Val int NOT NULL, | |
); | |
DECLARE @repeat int, @randval int, @sql nvarchar(MAX); | |
DECLARE @c int = 1000; -- How many islands to create | |
WHILE (@c > 0) | |
BEGIN; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# configuration.yaml | |
template: | |
- sensor: | |
- name: new_entity_id | |
device_class: power | |
unit_of_measurement: W # watts | |
state: "{{ states('sensor.target_entity_id') | default(0, true) | round(2, default=0) }}" | |
# customize.yaml | |
sensor.new_entity_id: |
OlderNewer