Skip to content

Instantly share code, notes, and snippets.

View silvesterwali's full-sized avatar
:octocat:
Coding lover

silvesterwali silvesterwali

:octocat:
Coding lover
View GitHub Profile
@silvesterwali
silvesterwali / learning_linux.md
Created November 6, 2024 02:32 — forked from akhan4u/learning_linux.md
Useful websites for Learning Linux
  1. Guided Self learning (https://linuxjourney.com)
  2. Best one liners for linux command line (https://www.commandlinefu.com/commands/browse)
  3. Find files in linux from command line (https://linuxize.com/post/how-to-find-files-in-linux-using-the-command-line)
  4. Improve your typing speed on the command line with this awesome tool! (https://github.com/balzss/cli-typer)
  5. An interactive cheatsheet tool for the command-line (https://github.com/denisidoro/navi)
  6. Customize your shell environment to next level (https://github.com/alebcay/awesome-shell)
  7. I find it useful to learn new things with the self learning courses offered by github (https://lab.github.com)
  8. A static analysis tool for shell scripts (https://github.com/koalaman/shellcheck)
  9. A good collection of bash snippets if you are starting to learn about shell scripts in linux (https://github.com/alexanderepstein/Bash-Snippets)
  10. Linux workshop 10 days (https://linuxessentials.netlify.app)
@silvesterwali
silvesterwali / README.md
Last active April 15, 2024 14:14
Nuxt3 Composable for handle simple auth

create file composable useRequestOptions.ts

useRequestOptions.ts

import type { AuthCredential } from "@/types";
export default function () {
  const config = useRuntimeConfig();

  const defaultRedirect = "/sign-in";
@silvesterwali
silvesterwali / gist:e219b586eda337dd09b938bc4dc563fa
Created April 15, 2024 08:02
Where Directory to put uploads files in nuxt3 server
Need help !
what directory should i put my file for example image while upload file to server.
in my case i put them under public/uploads and working just fine for dev mode.
but when i run command npm run build those files from public is copy to .output/public/uploads folder.
i wonder in production where i should put my upload file put them directly to .output/public/uploads or public/uploads.
here is my code that handle the file upload on `server/api/imageUpload.post.ts`
```ts
import { z } from 'h3-zod'
@silvesterwali
silvesterwali / token-generator.js
Created September 13, 2021 13:27 — forked from ziluvatar/token-generator.js
Example of refreshing tokens with jwt
/**
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken
* It was requested to be introduced at as part of the jsonwebtoken library,
* since we feel it does not add too much value but it will add code to mantain
* we won't include it.
*
* I create this gist just to help those who want to auto-refresh JWTs.
*/
const jwt = require('jsonwebtoken');

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@silvesterwali
silvesterwali / index.md
Last active March 10, 2021 16:37
Penggunaan Printjs untuk print html

Cara Penggunaan PrintJS

Berikut merupakan contoh aplikasi printJS pada html

source PrintJs .

    <!DOCTYPE html>
    <html lang="en">