Skip to content

Instantly share code, notes, and snippets.

View RioChndr's full-sized avatar
🏠
Working from home

Rio Chandra RioChndr

🏠
Working from home
View GitHub Profile
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<template>
<div class="ui-image" :style="getStyle()">
</div>
</template>
<script>
export default {
props: {
src: {
type: String,
@RioChndr
RioChndr / docker-compose-postgres.yml
Last active August 21, 2022 03:10
Docker compose postgresql
version: '3.1'
services:
db_postgres:
container_name: db_postgres_mynykah
image: postgres
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password123
@RioChndr
RioChndr / Common-problem-wsl.md
Created August 24, 2022 07:14
Commond problem WSL

Common problem wsl

CURL / Wget / any connection hang up

issue wsl

this because problem with network wsl to host. Solution is here. Run command sudo ifconfig eth0 mtu 1350, or it could be sudo ifconfig eth0 mtu xxxx.

Solution to make it permanent. add it to /etc/wsl.conf. detail here

Docker problem

Connect from container to host

Docker container cannot connect to host wsl. I don't know why.

microsoft/WSL#6364

Check your connection from container to host using this code. This will run curl code from container. alternatively you can do 2 test, using --add-host or not.

@RioChndr
RioChndr / docker-shortcut.md
Last active January 9, 2023 03:24
docker oneliner shortcut

Docker shortcut

Create postgresql db

postgres docker image

docker run -d --name=postgresql -p 5432:5432 -v /var/lib/postgresql/data:/var/lib/postgresql/data \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=postgres \
postgres
@RioChndr
RioChndr / metadata.jsx
Created March 6, 2023 04:05
Important meta data
function ImportantMetadata() {
const logo = "/favicon.png"
const title = ""
const description = ""
return (
<>
<title>{title}</title>
<link rel="icon" href={logo} />
<link rel="shortcut icon" type="image/x-icon" href={logo} />
<link rel="apple-touch-icon" sizes="180x180" href={logo} />