This batch file is useful to visualize passwords stored in your PC.
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
| Option Explicit | |
| Dim objshell,path,DigitalID, Result | |
| Set objshell = CreateObject("WScript.Shell") | |
| 'Set registry key path | |
| Path = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\" | |
| 'Registry key value | |
| DigitalID = objshell.RegRead(Path & "DigitalProductId") | |
| Dim ProductName,ProductID,ProductKey,ProductData | |
| 'Get ProductName, ProductID, ProductKey |
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 React from "react"; | |
| var MyMixin = { | |
| componentDidUpdate() { | |
| this.componentMethod() | |
| }, | |
| mixinMethod() {} | |
| }; | |
| const MyComponent = React.createClass({ |
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 merge(l1, l2) { | |
| const se = new Set(l1); | |
| l2.forEach(e => se.add(e)) | |
| return [...se] | |
| } | |
| const x = Object.keys(old).reduce((acc, cur) => { | |
| acc[cur] = merge(old[cur], neww[cur]); | |
| return acc | |
| }, {}) |
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
| netstat -ano | findstr :PORT | |
| taskkill /PID_NUMBER /F | |
| netstat -ano | findstr 3000 | |
| taskkill /9052 /F |
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 { useState, useEffect } from 'react' | |
| export const useMousePosition = () => { | |
| const [position, setPosition] = useState({ x: 0, y: 0 }); | |
| useEffect(() => { | |
| const setFromEvent = (e: any) => setPosition({ | |
| x: e.clientX, | |
| y: e.clientY | |
| }); | |
| window.addEventListener("mousemove", setFromEvent); |
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
| /* state.ts | |
| * Here we define the initial state of the application. | |
| * I have ommited the types for Newspapers, Table and State for brevity. | |
| */ | |
| export const state: State = { | |
| table: { | |
| selected: null, | |
| newspapers: [], | |
| }, | |
| } |
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 mysql = require('mysql2') | |
| const createConnection = (connectedCB) => { | |
| const envParams = { | |
| host: process.env.host, | |
| user: process.env.user, | |
| password: process.env.password, | |
| database: process.env.database, | |
| } | |
| if (Object.keys(envParams).some(k => envParams[k] == null)) { |
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 mysql = require('mysql2') | |
| const createConnection = (connectedCB) => { | |
| const envParams = { | |
| host: process.env.host, | |
| user: process.env.user, | |
| password: process.env.password, | |
| database: process.env.database, | |
| } | |
| if (Object.keys(envParams).some(k => envParams[k] == null)) { |