https://www.gutenberg.org/help/mirroring.html
rsync -av --del aleph.gutenberg.org::gutenberg-epub .
Alternative : download in .zim format
https://www.gutenberg.org/help/mirroring.html
rsync -av --del aleph.gutenberg.org::gutenberg-epub .
Alternative : download in .zim format
iPad_10.2_2020_17.4.1_21E237_Restore.ipsw
file that you downloaded.iPhone IPSW: https://www.iclarified.com/750/where-to-download-iphone-firmware-files-from
# npm create svelte@latest .
> skeleton project
Install Tailwind CSS
# npm install -D tailwindcss postcss autoprefixer
# npx tailwindcss init -p
# vim svelte.config.js
# vim tailwind.config.js
# vim ./src/app.css
# vim ./src/routes/+layout.svelte
Add code in svelte.config.js
import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
const config = {
kit: {
adapter: adapter()
},
preprocess: vitePreprocess()
};
export default config;
Edit file: tailwind.config.js
export default {
content: ['./src/**/*.{html,js,svelte,ts}'],
theme: {
extend: {}
},
plugins: []
};
Modify file ./src/app.css
@tailwind base;
@tailwind components;
@tailwind utilities;
Add Tailwind in +layout.svelte
<script>
import "../app.css";
</script>
<slot />
Sample +page.svelte code
<div class="text-3xl w-[300px] text-gray-600 bg-white p-10 mx-auto mt-10 shadow-lg rounded text-center">
Coming soon!
</div>
<style lang="postcss">:global(html) { background-color: theme(colors.gray.300) }</style>
Push to git (optional)
# git init && git add -A && git commit -m "Initial commit"
# git branch -M master
# git remote add origin [email protected]:project/gitname.git
# git push -u origin master
add_action('template_redirect', 'redirect_old_domain');
function redirect_old_domain() {
$old_domain = 'domain.org';
$new_domain = 'domain.com';
if ($_SERVER['HTTP_HOST'] == $old_domain && $request_uri == '/') {
// Redirect to the new domain without any path
$redirect_url = 'https://' . $new_domain;
wp_redirect($redirect_url, 302); // 302: Temporary redirect
exit;
}
// Check if the request is for a specific year
preg_match('/\/(\d{4})\//', $request_uri, $matches);
$year = isset($matches[1]) ? $matches[1] : '';
if ($year) {
// Redirect to the same URI on the new domain
$redirect_url = 'https://' . $new_domain . '/' . $year . $request_uri;
wp_redirect($redirect_url, 302); // 302: Temporary redirect
exit;
}
}
console.log('Loading function');
export const handler = async (event, context) => {
//console.log('Received event:', JSON.stringify(event, null, 2));
console.log('value1 =', event.key1);
console.log('value2 =', event.key2);
console.log('value3 =', event.key3);
return { message: "hello world", post_body:JSON.stringify(event.body), event: JSON.stringify(event) };
};
NodeJS Build
npm i -D @sveltejs/adapter-node
File: svelte.config.js
import adapter from '@sveltejs/adapter-node';
ecosystem.config.cjs
module.exports = {
apps: [
{
name: 'name_app',
script: './build/index.js',
watch: false,
// ignore_watch: ['database'],
autorestart: true,
env: {
PORT: 3000,
ENV_PATH: "./.env.local",
}
}
]
};
cd "/var/www/domain.com/www/source"
git reset --hard
git pull
npm i
npm run build
pm2 reload "project_name"
Compatible with Node v21.6.1 (web52)
{
"name": "something project name",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start -p 3000",
"lint": "next lint"
},
"dependencies": {
"autoprefixer": "10.4.16",
"axios": "^1.6.2",
"dayjs": "^1.11.10",
"get-youtube-id": "^1.0.1",
"googleapis": "^128.0.0",
"md5": "^2.3.0",
"nanoid": "^5.0.3",
"next": "14.0.2",
"next-auth": "^4.24.5",
"nookies": "^2.5.2",
"postcss": "8.4.31",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-icons": "^4.12.0",
"react-lottie": "^1.2.3",
"react-simple-snackbar": "^1.1.11",
"react-youtube": "^10.1.0",
"sweetalert2": "^11.10.0",
"tailwindcss": "3.3.5",
"ua-parser-js": "^1.0.37",
"youtube-player": "^5.6.0"
},
"devDependencies": {
"autoprefixer": "^10.0.1",
"postcss": "^8",
"tailwindcss": "^3.3.0"
}
}
Backup to folder "databasename-DATE"
mongodump --db databasename --out databasename-$(date +'%m-%d-%y')
Restore
mongorestore --db databasename --drop databasename-DATE/databasename
mongorestore --db databasename databasename-DATE/databasename
--drop : we’ll make sure that the target database is first dropped so that the backup is restored in a clean database