Skip to content

Instantly share code, notes, and snippets.

View fazaio's full-sized avatar
🪄
Pesulap code!

Faza Aulia Rosyadan fazaio

🪄
Pesulap code!
View GitHub Profile
@fazaio
fazaio / nginx
Created May 29, 2023 17:20
nginx
nginx file
server {
listen 80;
listen [::]:80;
root /var/www/javasuperapp.com/html;
index index.html index.htm index.nginx-debian.html;
server_name javasuperapp.com www.javasuperapp.com;
@fazaio
fazaio / xrandr
Created May 27, 2023 10:44
xrandr samsung SR24305
gtf 1920 1080 60
xrandr --newmode "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
xrandr --addmode VGA-1 "1920x1080_60.00"
xrandr --output VGA-1 --mode "1920x1080_60.00"
autorandr --load current
xrandr --output VGA-1 --brightness 0.5
@fazaio
fazaio / cli docker
Last active November 14, 2023 07:00
Docker shortcut
Create Image from Dockerfile
docker build --tag trenbox:1.0 .
Create Container from Image
docker container create --name mycontainer -p 80:80 dokcerimages
Seting ENV (!!! the env must before image)
docker container create --name superserver -p 1337:1337 -e JWT_TOKEN='testing' node-javasuper
@fazaio
fazaio / vue_pinia_typescript
Created February 21, 2023 19:29
vue3 pinia typescript initialize declare variable ref array using interface typescript.
export interface orderCart {
id_product: number;
total_product: number;
}
state: () => {
return {
allProduct: [],
totalAll: "",
checkoutItem: ref<Array<orderCart>>([]),
@fazaio
fazaio / app.js
Created January 27, 2023 06:29
NodeJS & MongoDB ( export module connection mongodb, reuseable and clean code)
const DB = require("./src/configs/db");
const USERS_COLLECTION = DB.client.db("Tjackrabirawa").collection("users");
const READS_USERS = async () => {
try {
await DB.connectToDB();
let arr = [];
let result = USERS_COLLECTION.find();
await result.forEach((element) => {
arr.push(element);
{
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"eslint.format.enable": true,
"vetur.format.defaultFormatter.html": "prettyhtml",
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"eslint.alwaysShowStatus": false,
@fazaio
fazaio / ESP32-Client-NodeJS-Server-TCP.ino
Created April 6, 2021 16:56
ESP32 TCP client to NodeJS TCP server
/*
Simple basic example From ESP32/ESP8266 as Client to Nodejs as a server via TCP Protocol.
*/
//----------- ESP32 as TCP Client----------------
// file .ino
#include "WiFi.h"
const char* ssid = "SSID";
const char* password = "password";
@fazaio
fazaio / vue-code-snipped.md
Last active September 5, 2021 09:21
vuejs main code

Form handle button

<form action="" @submit.prevent="sign()">

Best Practice Toogle conditions

<button @click="show = !show" />
<div v-if="show" >hello world</div>
@fazaio
fazaio / curl.php
Created October 19, 2020 07:56
Curl Function PHP
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
// ----------------------------------------------------------
//
// format function curl($url,$pos,$cookie,$body,$head,$sock)
//
// ----------------------------------------------------------
@fazaio
fazaio / rules.css
Last active November 21, 2020 11:41
CSS Media Queries Rules
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS