- DigitalOcean Ubuntu 24.04 LTS server with root or sudo access
- Domain name pointed to your server's IP address
- Cloudflare account with domain added
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 TInitValue = string | number | null | undefined; | |
| class Money { | |
| private value: number | null; | |
| constructor(initValue: TInitValue) { | |
| if (!initValue) { | |
| this.value = null; | |
| return; | |
| } |
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
| // C++ includes used for precompiling -*- C++ -*- | |
| // Copyright (C) 2003-2015 Free Software Foundation, Inc. | |
| // | |
| // This file is part of the GNU ISO C++ Library. This library is free | |
| // software; you can redistribute it and/or modify it under the | |
| // terms of the GNU General Public License as published by the | |
| // Free Software Foundation; either version 3, or (at your option) | |
| // any later version. |
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
| module.exports = { | |
| printWidth: 80, | |
| tabWidth: 4, | |
| arrowParens: "avoid", | |
| plugins: ["prettier-plugin-tailwindcss"], | |
| }; |
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
| #user nobody; | |
| worker_processes 1; | |
| #error_log logs/error.log; | |
| #error_log logs/error.log notice; | |
| #error_log logs/error.log info; | |
| #pid logs/nginx.pid; |
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 os | |
| import shutil | |
| def convert_files(folder_path, old_ext, new_ext): | |
| for dirpath, dirnames, filenames in os.walk(folder_path): | |
| for filename in filenames: | |
| if filename.endswith(old_ext): | |
| old_file_path = os.path.join(dirpath, filename) | |
| new_file_path = os.path.splitext(old_file_path)[0] + new_ext | |
| shutil.move(old_file_path, new_file_path) |
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
| { | |
| "Typescript React Functional Component with Props": { | |
| "prefix": "fcp", | |
| "body": [ | |
| "import type { FC } from \"react\";\n\ntype Props = {};\n\nconst $1: FC<Props> = () => {\n return <>$1</>;\n};\n\nexport default $1;\n" | |
| ] | |
| }, | |
| "Simple Typescript React Functional Component": { | |
| "prefix": "fcs", | |
| "body": ["const $1 = () => {\n return <>$1</>;\n};\n\nexport default $1;\n"] |
The basic idea is that we follow these steps:
Create a new empty repository New. Make an initial commit because we need one before we do a merge. Add a remote to old repository OldA. Merge OldA/master to New/master. Make a subdirectory OldA. Move all files into subdirectory OldA. Commit all of the file moves. Repeat 3-6 for OldB.
NewerOlder