Skip to content

Instantly share code, notes, and snippets.

View HeySora's full-sized avatar

HeySora HeySora

View GitHub Profile
@raspi
raspi / enable-all-advanced-power-settings.ps1
Last active March 2, 2024 16:11
Enable all advanced power settings in Windows.
# List all possible power config GUIDs in Windows
# Run: this-script.ps1 | Out-File powercfg.ps1
# Then edit and run powercfg.ps1
# (c) Pekka "raspi" Järvinen 2017
$powerSettingTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSetting
$powerSettingInSubgroubTable = Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSettingInSubgroup
Get-WmiObject -Namespace root\cimv2\power -Class Win32_PowerSettingCapabilities | ForEach-Object {
$tmp = $_.ManagedElement
@Bradshaw
Bradshaw / better_sin.js
Created June 28, 2017 08:47
Better version of Math.sin for javascript
var old_sin = Math.sin;
Math.sin = function(x) {
if (typeof x == "number" && isFinite(x)){
return old_sin(x);
}
var str = "" + x;
if (str.length>0){
str = str.repeat(Math.ceil(Math.max(1,18/str.length)));
}
var sinstr = "|\n";
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 19, 2024 11:15 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy