Skip to content

Instantly share code, notes, and snippets.

View MILKTON's full-sized avatar
💭
Learning new stuff!

Milton MILKTON

💭
Learning new stuff!
View GitHub Profile
import React, { useEffect, useRef, useState } from "react"
export const VisualViewport = ({
as: Element = "div",
children,
style = {},
...props
}) => {
const ref = useRef (null)
@MILKTON
MILKTON / SuperScript
Last active December 30, 2020 23:16
Abrir "aquí" PowerShell como administrador
$menu = 'Abrir PowerShell como Administrador'
$command = "$PSHOME\powershell.exe -NoExit -Command ""Set-Location '%V'"""
'directory', 'directory\background', 'drive' | ForEach-Object { New-Item -Path "Registry::HKEY_CLASSES_ROOT\$_\shell" -Name runas\command -Force | Set-ItemProperty -Name '(default)' -Value $command -PassThru | Set-ItemProperty -Path {$_.PSParentPath} -Name '(default)' -Value $menu -PassThru | Set-ItemProperty -Name HasLUAShield -Value '' }