--local | --global | --system
[user|author].name <name>
[user|author].email <email>
init.defaultBranch <name>
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Event listener on a CSS pseudo-elemen</title> | |
| <style> | |
| #box { | |
| position: relative; | |
| height: 300px; |
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
| { | |
| // Initialize constructor functions Constructor/Prototype | |
| function Person(firstName, lastName) { | |
| this.firstName = firstName | |
| this.lastName = lastName | |
| } | |
| Person.prototype.getFullName = function () { | |
| return this.firstName + ' ' + this.lastName | |
| } |
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 } from 'react' | |
| export default function ReactApp() { | |
| const [count, setCount] = useState(0) | |
| function handleClick() { | |
| setCount(count + 1) | |
| } | |
| return <button onClick={handleClick}>Clicked {`${count}`} times</button> |
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
| <h1>Counter</h1> | |
| <p role="status">Current count: @currentCount</p> | |
| <button class="btn btn-primary" @onclick="IncrementCount">Click me</button> | |
| @code { | |
| [Inject] | |
| public IJSRuntime JSRuntime { get; set; } = null!; | |
| public async void ConsoleLog(int arg) |
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
| window.addEventListener('load', () => { | |
| const html = document.documentElement, | |
| button = document.createElement('button'), | |
| light = '🔆', | |
| dark = '🌙'; | |
| let styles = { | |
| position: 'absolute', | |
| top: '2px', | |
| right: '2px', |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Preview</title> | |
| <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> | |
| <style> |
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
| // Handle the post message inside the frame window | |
| // index.html | |
| frame.onload = () => { | |
| setTimeout(() => { | |
| window.frames.frame.postMessage("hello Frame", "*"); | |
| }, 5000) | |
| } | |
| // Handle the message from the parent window |
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
| echo 'MAIN ICON "favicon.ico"' > resources.rc | |
| g++.exe -Wall -fexceptions -g -c app.cpp -o app.o | |
| windres.exe -J rc -O coff -i RESOUR~1.RC -o resources.res | |
| g++.exe -o app.exe app.o resources.res |
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
| process.stdout.write('\n\x1b[0;32mPress any key to continue . . . \x1b[0m'); | |
| process.stdin.setRawMode(true); | |
| process.stdin.resume(); | |
| process.stdin.on('data', process.exit.bind(process, 0)); |
NewerOlder