- Location - The location of the application. Usually just a URL, but the location can contain multiple pieces of information that can be used by an app
- pathname - The "file/directory" portion of the URL, like
invoices/123 - search - The stuff after
?in a URL like/assignments?showGrades=1. - query - A parsed version of search, usually an object but not a standard browser feature.
- hash - The
#portion of the URL. This is not available to servers inrequest.urlso its client only. By default it means which part of the page the user should be scrolled to, but developers use it for various things. - state - Object associated with a location. Think of it like a hidden URL query. It's state you want to keep with a specific location, but you don't want it to be visible in the URL.
- pathname - The "file/directory" portion of the URL, like
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 Cocoa | |
| import Foundation | |
| import AppKit | |
| import CoreFoundation | |
| import ApplicationServices | |
| /// https://jvns.ca/blog/2019/11/25/challenge--make-a-bouncy-window-manager/ | |
| /* | |
| This code runs the following sequence: |
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
| # Description: Boxstarter Script | |
| # Author: Jess Frazelle <[email protected]> | |
| # Last Updated: 2017-09-11 | |
| # | |
| # Install boxstarter: | |
| # . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
| # | |
| # You might need to set: Set-ExecutionPolicy RemoteSigned | |
| # | |
| # Run this boxstarter by calling the following from an **elevated** command-prompt: |
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
| #!/boot/bzImage | |
| # Linux kernel userspace initialization code, translated to bash | |
| # (Minus floppy disk handling, because seriously, it's 2017.) | |
| # Not 100% accurate, but gives you a good idea of how kernel init works | |
| # GPLv2, Copyright 2017 Hector Martin <[email protected]> | |
| # Based on Linux 4.10-rc2. | |
| # Note: pretend chroot is a builtin and affects the current process | |
| # Note: kernel actually uses major/minor device numbers instead of device 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
| package main | |
| import ( | |
| "fmt" | |
| "syscall" | |
| "unicode/utf16" | |
| "unsafe" | |
| ) | |
| const invalidHandle = ^uintptr(0) |
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
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "os" | |
| "os/signal" | |
| evdev "github.com/gvalkov/golang-evdev" | |
| screen "github.com/nathany/bobblehat/sense/screen" |
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
| package main | |
| import ( | |
| "log" | |
| "syscall" | |
| "unsafe" | |
| ) | |
| var ( | |
| kernel32 = syscall.NewLazyDLL("kernel32.dll") |
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
| // +build windows | |
| package screen | |
| import ( | |
| "fmt" | |
| "image" | |
| "reflect" | |
| "syscall" | |
| "unsafe" |
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 dgryski-set-prompt { | |
| if [ $(tput colors) -ge 8 ]; then | |
| BRED='\[\e[1;31m\]' | |
| RED='\[\e[0;31m\]' | |
| BGREEN='\[\e[1;32m\]' | |
| GREEN='\[\e[0;32m\]' | |
| BYELLOW='\[\e[1;33m\]' | |
| YELLOW='\[\e[0;33m\]' | |
| BBLUE='\[\e[1;34m\]' |
NewerOlder