This file contains hidden or 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 Workers | Web App Manifest | Push Notifications | ||
---|---|---|---|---|
Chrome | yes | yes | yes | |
Edge | yes | no | yes | |
Firefox | yes | no | yes | |
Safari | yes | no | no |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<meta name="theme-color" content="#ffffff"> | |
<link rel="manifest" href="/manifest.json"> | |
<title>First PWA</title> | |
</head> | |
<body> | |
<h1>Hello PWA!</h1> |
This file contains hidden or 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
// "Install" event handler will be invoked only once when you first time navigate to the page | |
self.addEventListener('install', function(event) { | |
event.waitUntil( | |
caches.open('app-cache').then(function(cache) { | |
// Adds index.html page to the cache | |
return cache.add('index.html'); | |
}) | |
); | |
}); |
This file contains hidden or 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
{ | |
"name": "First PWA", | |
"short_name": "PWA", | |
"start_url": "/", | |
"display": "standalone", | |
"theme_color": "#ffffff", | |
"background_color":"#ffffff", | |
"icons": [ | |
{ | |
"src": "logo-512.png", |
This file contains hidden or 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 Retry-Command { | |
param ( | |
[Parameter(Mandatory = $true)][string]$Command, | |
[Parameter(Mandatory = $true)][hashtable]$Args, | |
[Parameter(Mandatory = $false)][int]$Retries = 5, | |
[Parameter(Mandatory = $false)][int]$SecondsDelay = 5, | |
[Parameter(Mandatory = $false)][string]$Name = "" | |
) | |
# Setting ErrorAction to Stop is important. This ensures any errors that occur in the command are |
This file contains hidden or 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 @t table (name varchar (255), | |
[rows] varchar(255), | |
reserved varchar(255), | |
data varchar (255), | |
index_size varchar( 255), | |
unused varchar(255 )) | |
delete from @t | |
insert into @t exec sp_MSforeachtable @command1 ='EXEC sp_spaceused ''?''',@whereand= 'or OBJECTPROPERTY(o.id, N''IsSystemTable'') = 1' | |
select * | |
from @t |
This file contains hidden or 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
SELECT ROUTINE_NAME, ROUTINE_DEFINITION | |
FROM INFORMATION_SCHEMA.ROUTINES | |
WHERE ROUTINE_DEFINITION LIKE '%Foo%' | |
AND ROUTINE_TYPE='PROCEDURE' | |
SELECT OBJECT_NAME(id) | |
FROM SYSCOMMENTS | |
WHERE [text] LIKE '%Foo%' | |
AND OBJECTPROPERTY(id, 'IsProcedure') = 1 | |
GROUP BY OBJECT_NAME(id) |