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
<?php | |
use Resque; | |
use ResqueScheduler\ResqueScheduler; | |
/** | |
* Base class for recurring Resque jobs. | |
* | |
* Jobs must implement the recurrentSetUp(), recurrenctPerform(), and recurrentTearDown() | |
* methods instead of the normal setUp(), perform(), and tearDown() methods. | |
* |
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
import time | |
## fix ms-gamebar annoyance after uninstalling Xbox: https://www.reddit.com/r/Windows11/comments/vm046d/is_there_any_way_to_remove_the_xbox_game_bar/ie0j6o3/ | |
# Try importing the required packages | |
try: | |
import vgamepad as vg | |
import pygetwindow as gw | |
import win32gui |
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
# https://ss64.com/ps/syntax-settings.html | |
Clear-Host | |
Write-Host " ===== Run a Settings App =====" | |
Write-Host | |
function Show-Menu { | |
Write-Host " Enter 'A' for Accessibility settings." | |
Write-Host " Enter 'B' for Apps settings." | |
Write-Host " Enter 'O' for Audio settings." |
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
## Instructions | |
## 1. Run this script (under Powershell as Administrator): | |
## powershell -ExectionPolicy Bypass .\cleanup-win10.ps1 | |
## 2. Let it run through, you may see a few errors, this is normal | |
## 3. Reboot | |
## shutdown /r /t 0 | |
## 5. Done! | |
## | |
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT |
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
-- Finds degree of similarity between two strings, based on Dice's Coefficient | |
DROP FUNCTION IF EXISTS dbo.CompareTwoStrings | |
GO | |
CREATE FUNCTION dbo.CompareTwoStrings ( | |
@string1 nvarchar(4000) | |
, @string2 nvarchar(4000) | |
) RETURNS NUMERIC(10, 10) | |
AS BEGIN | |
DECLARE @i INT |
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
Invoke-Sqlcmd | Out-Null | |
Get-ChildItem 'SQLSERVER:\sqlregistration\Database Engine Server Group' -Recurse ` | |
| Where-Object {$_ -is [Microsoft.SqlServer.Management.RegisteredServers.RegisteredServer]} ` | |
| Select-Object DisplayName, ConnectionString ` | |
| ConvertTo-Json -Depth 3 -Compress ` | |
| Out-File -FilePath .\output.json | |
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
@if (@X)==(@Y) @end /* JScript comment | |
@echo off | |
if [%1]==[] ( | |
echo Drag and drop a CSV file onto this one! | |
pause | |
) | |
cscript //E:JScript //nologo "%~f0" %* | |
exit /b %errorlevel% | |
@if (@X)==(@Y) @end JScript comment */ |
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
const i = document.createElement('iframe'); | |
i.style.display = 'none'; | |
document.body.appendChild(i); | |
window.console = i.contentWindow.console; |
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
const i = document.createElement('iframe'); | |
i.style.display = 'none'; | |
document.body.appendChild(i); | |
const obj = {}; | |
Object.keys(window) | |
.filter(value => Object.keys(i.contentWindow).indexOf(value) < 0) | |
.forEach(key => obj[key] = window[key]); |
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
console.log( | |
Array.from(document.querySelectorAll('*')) | |
.filter((el) => customElements.get(el.nodeName.toLowerCase()) !== undefined || el.getAttribute("is")) | |
) |
NewerOlder