Skip to content

Instantly share code, notes, and snippets.

View syukronrm's full-sized avatar

Syukron Rifa'il Muttaqi syukronrm

View GitHub Profile
@syukronrm
syukronrm / README.md
Created August 10, 2022 05:32 — forked from nikoheikkila/README.md
Fish Shell function for sourcing standard .env files

envsource

I've been using Fish shell for years which is great and all, but one thing that has got me frustrated is using it with .env files.

When attempting to run source .env in a project, I usually encounter this problem:

.env (line 2): Unsupported use of '='. In fish, please use 'set KEY value'.
from sourcing file .env
source: Error while reading file '.env'

This code works in C++.

#include <stdio.h>
#include <stdlib.h>

int main() {
    int a = 100;
    int b = 200;
    int c = (a == 10 ? a : b) = 300;
int pin1, pin2, pin3;
int currentPos = 0; // posisi derajat aervo
int currentState = NULL;
int SPIN = 1;
int STOP = 2;
int RESET = 3;
loop() {
@syukronrm
syukronrm / postgresql.md
Last active May 30, 2021 13:38
Postgresql

Change to postgres user

sudo -i -u postgres

Backup

pg_dump -U [username] [db_name] > [backup_name]