value | parseInt(value) | +value | value|0 |
---|---|---|---|
0 | 0 | 0 | 0 |
10 | 10 | 10 | 10 |
10.9 | 10 | 10.9 | 10 |
-1 | -1 | -1 | -1 |
-1.9 | -1 | -1.9 | -1 |
'10' | 10 | 10 | 10 |
'ten' | NaN |
NaN |
0 |
null |
0 | NaN |
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
Verifying my identity on Peepeth.com 0xbae995278b1102ceb8e86d6eb87d5f0c1caa3986 |
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
var isoCountries = { | |
'af' : 'Afghanistan', | |
'ax' : 'Aland Islands', | |
'al' : 'Albania', | |
'dz' : 'Algeria', | |
'as' : 'American Samoa', | |
'ad' : 'Andorra', | |
'ao' : 'Angola', | |
'ai' : 'Anguilla', | |
'aq' : 'Antarctica', |
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
// ==UserScript== | |
// @name Ocarina of Amazon | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author @jimmieverse | |
// @match https://www.amazon.com/* | |
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== | |
// @grant none | |
// ==/UserScript== |
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
{"schemaVersion":1,"label":"Branches","message":"100%","color":"brightgreen","namedLogo":"jest"} |
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
{"schemaVersion":1,"label":"Branches","message":"59%","color":"red","namedLogo":"jest"} |
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
# Requires jj - https://github.com/tidwall/jj | |
# Can be modified to use jq | |
# Probably tons of unhandled edge cases | |
# | |
# Usage: | |
# In a directory that looks like this: | |
# | |
# . | |
# ├── generate-exports.sh | |
# ├── package.json |
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
type CombineAll<T> = T extends {[name in keyof T]: infer Type} ? Type : never | |
type PropertyNameMap<T, IncludeIntermediate extends boolean> = { | |
[name in keyof T]: T[name] extends object ? ( | |
SubPathsOf<name, T, IncludeIntermediate> | (IncludeIntermediate extends true ? name : never) | |
) : name | |
} | |
type SubPathsOf<key extends keyof T, T, IncludeIntermediate extends boolean> = ( | |
`${string & key}.${string & PathsOf<T[key], IncludeIntermediate>}` |
Because I've done this so many times in my life but always seem to forget how.
This approach WILL:
- Redirect naked domain to www domain in all conditions
- Redirect http to https in all conditions
- Preserve URL paths and queries. So http://mydomain.com/earth/africa ultimately leads to https://www.mydomain.com/earth/africa
Downsides:
Source: Sebastian Lague
https://www.youtube.com/@SebastianLague/videos
-
Episodes 1-2: Skip
-
Episode 3: Watch
Good overview of Unity UI and how it supports composition.
Recommended reading: Unity Docs: GameObjects
OlderNewer