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
/* | |
* An outline example of how to create a generic component using Typescript and | |
* React. | |
* | |
* This is NOT the only way to do something like this. | |
*/ | |
// === Generic component === | |
/** |
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
/* | |
* No Typescript types for Rita, so: | |
* | |
* 1. Add module declaration, e.g. in a file called "decls.d.ts": | |
* | |
* declare module 'rita'; | |
* | |
* 2. adjust include path in tsconfig.json: | |
* | |
* "include": ["src", "decls.d.ts"], |
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
# Instead of returning JSON with "_embedded" HATEOAS structures (e.g. when returning PagedModel), use a nicer format | |
# with "links", "content" and "page". | |
# | |
# The media type on the controller method should be "application/json", NOT "application/hal+json". | |
spring.hateoas.use-hal-as-default-json-media-type=false |
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
curl -H "Access-Control-Request-Method: GET" -H "Origin: http://localhost:3000" --head http://my.api.com/whatever | |
curl -H "Access-Control-Request-Method: GET" -H "Origin: http://localhost:3000" --head http://my.api.com/whatever | grep "<" | |
curl -H "Access-Control-Request-Method: GET" -H "Origin: http://localhost:3000" --head http://my.api.com/whatever | grep "Access-Control" |
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
git rebase -Xtheirs master | |
git rebase -Xours master |
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
sudo tcpflow -p -c -i lo port 8080 |
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
Creating a brand new vue.js application with Typescript was working, but there were errors reported by VS Code when trying to import modules, it would complain that the module or type definitions could not be found. | |
- make sure obsolete vue.js extensions like Vetur are no longer installed | |
- install Vue Language Features (Volar) and nothing else | |
- in the extensions tab in VS Code, type "@builtin typescript" | |
- choose TypeScript and JavaScript Language Features | |
- in the editor content pane, find the gear icon to enable/disable the extension | |
- choose Disable (workspace) | |
- restart VS Code | |
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
# Mostly but not completely works... | |
git clone https://gitlab.com/garfvl/denv.git | |
export PATH=`pwd`/denv/bin:$PATH | |
git clone https://code.videolan.org/videolan/vlc.git | |
cd vlc | |
denv list | |
denv compile-vlc-win64 | |
cd vlc | |
./extras/package/win32/build.sh -l -a x86_64 -i n |
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
npx npm-check-updates -u && npm i |
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
git commit --amend --date=now |
NewerOlder