CREATE OR REPLACE FUNCTION reset_all_sequences()
RETURNS VOID AS $$
DECLARE
table_name_var TEXT;
column_name TEXT;
BEGIN
-- Loop through all tables in the database
FOR table_name_var IN (SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_type = 'BASE TABLE') LOOP
-- Find the name of the sequence associated with the auto-increment column
- List all available wifi, you will see all available wifi with SSID and signal strength
nmcli dev wifi
- Connect to wifi:
nmcli dev wifi connect "SSID name" password "wifi password"
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
server { | |
listen 80; | |
server_name ~^(?<subdomain>.+)\.domain\.com domain.com; | |
# Location block for path that threated as assets | |
location ~* ^/(?<asset>image|css|js|fonts|@vite|node_modules)/(.*) { | |
proxy_pass http://127.0.0.1:3000/$asset/$2; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_http_version 1.1; |
public getUrl(location: string): string {
const {
endpoint: configEndpoint,
bucket,
forcePathStyle,
region,
} = this.$config;
const awsHost = region ? `s3.${region}.amazonaws.com` : "s3.amazonaws.com";
let endpoint = (configEndpoint as string) || `https:${awsHost}`;
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
FROM alpine:edge AS base | |
# install node | |
RUN apk add --no-cache nodejs npm tini | |
# set working directory | |
WORKDIR /var/www | |
#install pnpm | |
RUN npm install -g pnpm | |
# Set tini as entrypoint | |
ENTRYPOINT ["/sbin/tini", "--"] | |
# copy project file |
- Pastikan rust dan dependencynya sudah terinstall
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Jika keluar
No package dbus-1 found
install package tersebutsudo apt install libdbus-1-dev pkg-config
- Jika keluar error terkait
openssl
install package berikut
buat atau copy kode di bawah di file ~/.config/nvim/init.vim
lua require('plugins')
call plug#begin('~/.vim/plugged')
Plug 'preservim/nerdtree'
Plug 'junegunn/limelight.vim'
Part ini wajib dipahami dan dicoba hingga lancar sebelum melangkah ke part yang lain.
Catatan ini saya taruh di atas untuk pemula yang kadang bingung untuk keluar dari VIM.
:q
untuk keluar dari VIM jika belum melakukan perubahan. Jika sudah melakukan perubahan maka akan terjadi error. Kita harus melakukan save dokument dulu dengan:w
.:q!
jika kita ingin keluar tanpa save.!
artinya ignore. Semacam force quit:wq
kombinasi dari:w
dan:q
, artinya save dan exit.
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
// src/lib/Support/Http/API.ts | |
import Axios from 'axios' | |
import {get} from "svelte/store" | |
import {Errors$} from "$lib/Support/Store/Error" | |
import { Auth$ } from '$lib/Support/Store/Auth' | |
import type {TApiCall} from "$lib/Contract/Http" | |
import {BASE_API} from "$lib/Env" | |
import {goto} from "$app/navigation" | |
import Toast from "$lib/Support/Store/Toast" |