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
var docWidth = document.documentElement.offsetWidth; | |
[].forEach.call( | |
document.querySelectorAll('*'), | |
function(el) { | |
if (el.offsetWidth > docWidth) { | |
// el.style.outline = "1px solid red"; | |
console.log(el, docWidth, el.offsetWidth); | |
} | |
} |
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
// Run this on browser console | |
var findUndefinedCSSClasses = (function () { | |
"use strict"; | |
//get all unique CSS classes defined in the main document | |
let allClasses = Array.from(document.querySelectorAll('*')) | |
.map(n => Array.from(n.classList)) | |
.reduce((all, a) => all ? all.concat(a) : a) | |
.reduce((all, i) => all.add(i), new Set()); |
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
class WiFiState | |
{ | |
[string]$IPv4Address | |
[string]$IPv6Address | |
[string]$SSID | |
[string]$BSSID | |
[string]$State | |
[string]$Authentication | |
[string]$Channel | |
[string]$Signal |
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
# 1) SSID of Wireless Network (CaSe Sensitive) | |
# netsh wlan show networks | |
$mySSID = 'Tejas' | |
# 2) Wireless Profile Name (CaSe Sensitive) | |
# netsh wlan show profile | |
$profileName = 'Tejas' | |
# 3) Name of Wireless Interface (CaSe Sensitive) | |
# netsh wlan show interfaces |
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
// CREDIT: https://stackoverflow.com/questions/33289726/combination-of-async-function-await-settimeout | |
//Since Node 7.6, you can combine the functions promisify function from the utils module with setTimeout() . | |
//Node.js | |
const sleep = require('util').promisify(setTimeout) | |
//Javascript | |
const sleep = m => new Promise(r => setTimeout(r, m)) | |
//Usage | |
(async () => { |
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
Import-Module posh-git | |
# Chocolatey profile | |
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" | |
if (Test-Path($ChocolateyProfile)) { | |
Import-Module "$ChocolateyProfile" | |
} | |
$forePromptColor = 0 |
You need to run two instances of PowerShell, one in Admistrator mode and another in regular mode.
In regular PowerShell:
NOTE: Remove
-AllowPrerelease
command if it doesn't work.
PowerShellGet\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force
Then run
PowerShellGet\Update-Module posh-git
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
[PHP] | |
;;;;;;;;;;;;;;;;;;; | |
; About php.ini ; | |
;;;;;;;;;;;;;;;;;;; | |
; PHP's initialization file, generally called php.ini, is responsible for | |
; configuring many of the aspects of PHP's behavior. | |
; PHP attempts to find and load this configuration from a number of locations. | |
; The following is a summary of its search order: |