-
Create a fresh new Next js project. https://nextjs.org/docs/getting-started#automatic-setup
pnpm create next-app --typescript -
install prettier
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
| tool | |
| extends SceneTree | |
| const PLATFORM_ANDROID = "Android" | |
| const PLATFORM_HTML5 = "HTML5" | |
| const PLATFORM_IOS = "iOS" | |
| const PLATFORM_LINUX = "Linux/X11" | |
| const PLATFORM_MAC = "Mac OSX" | |
| const PLATFORM_UWP = "UWP" | |
| const PLATFORM_WINDOWS = "Windows Desktop" |
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
| ## For a beginner-friendly version of the following (more advanced users likely will get better use of the below, | |
| ## if you're just starting out...), see this new gist: | |
| ## https://gist.github.com/WolfgangSenff/0a9c1d800db42a9a9441b2d0288ed0fd | |
| This document represents the beginning of an upgrade or migration document for GDScript 2.0 and Godot 4.0. I'm focusing on 2D | |
| at the moment as I'm upgrading a 2D game, but will hopefully have more to add for 3D afterward. | |
| ## If you want more content like this, please help fund my cat's medical bills at https://ko-fi.com/kyleszklenski - thank you very much! On to the migration guide. |
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
| version: '3.1' | |
| services: | |
| reverse-proxy: | |
| image: traefik # The official Traefik docker image | |
| command: --api --docker # Enables the web UI and tells Traefik to listen to docker | |
| ports: | |
| - "80:80" # The HTTP port | |
| - "8080:8080" # The Web UI (enabled by --api) | |
| volumes: | |
| - /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events |
Searching can be an efficient way to navigate the current buffer.
The first search commands we learn are usually / and ?. These are seriously cool, especially with the incsearch option enabled which lets us keep typing to refine our search pattern. / and ? really shine when all we want is to jump to something we already have our eyeballs on but they are not fit for every situation:
- when we want to search something that's not directly there, those two commands can make us lose context very quickly,
- when we need to compare the matches.
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
| " Statusline (requires Powerline font) | |
| set statusline= | |
| set statusline+=%(%{&buflisted?bufnr('%'):''}\ \ %) | |
| set statusline+=%< " Truncate line here | |
| set statusline+=%f\ " File path, as typed or relative to current directory | |
| set statusline+=%{&modified?'+\ ':''} | |
| set statusline+=%{&readonly?'\ ':''} | |
| set statusline+=%= " Separation point between left and right aligned items | |
| set statusline+=\ %{&filetype!=#''?&filetype:'none'} | |
| set statusline+=%(\ %{(&bomb\|\|&fileencoding!~#'^$\\\|utf-8'?'\ '.&fileencoding.(&bomb?'-bom':''):'') |
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
| $ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 |
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
| #Rewrites the request, extracting a fragment of the file name and using a remote server. | |
| location @fetchFromRemote { | |
| rewrite ^/path/to/images/(.*)$ http://remoteserver.com/other/path/to/images/$1 redirect; | |
| } | |
| #Will try to see if we have the file in this server, is not will use fetchFromRemote | |
| location ~ ^/path/to/images/.*(png|jpg|jpeg|gif|ico|swf)$ { | |
| try_files $uri @fetchFromRemote; | |
| } |
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
| /** | |
| * @author RubaXa <trash@rubaxa.org> | |
| * @license MIT | |
| */ | |
| (function () { | |
| "use strict"; | |
| function _then(promise, method, callback) { | |
| return function () { |
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
| # | |
| # Acts as a nginx HTTPS proxy server | |
| # enabling CORS only to domains matched by regex | |
| # /https?://.*\.mckinsey\.com(:[0-9]+)?)/ | |
| # | |
| # Based on: | |
| # * http://blog.themillhousegroup.com/2013/05/nginx-as-cors-enabled-https-proxy.html | |
| # * http://enable-cors.org/server_nginx.html | |
| # | |
| server { |
NewerOlder