Skip to content

Instantly share code, notes, and snippets.

View fachryansyah's full-sized avatar
🌑
code in the darkness

Muhammad Fahriansyah fachryansyah

🌑
code in the darkness
  • Depok City, Indonesia
View GitHub Profile
@fachryansyah
fachryansyah / .vim
Last active November 20, 2021 19:07
init.vim
call plug#begin('~/.vim/plugged')
" leave some space in between
Plug 'preservim/nerdtree'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'pineapplegiant/spaceduck', { 'branch': 'main' }
Plug 'nvim-lualine/lualine.nvim'
@fachryansyah
fachryansyah / .js
Last active November 10, 2021 14:32
BotWA.js
const express = require('express')
const axios = require('axios');
const bodyParser = require('body-parser')
const app = express()
const port = 5000;
app.use(bodyParser.json())
app.get('/', (req, res) => {
res.send('Hello World!')
@fachryansyah
fachryansyah / js
Created November 7, 2021 13:26
mail.js
const { parentPort, workerData } = require('worker_threads');
const { sendMail } = require("../module/mailer");
// Perform send mail
parentPort.once("message", (message) => {
message.forEach(async item => {
await sendMail(item.transporterOptions, item.mailOptions, item.num);
});
});
@fachryansyah
fachryansyah / .zshrc
Created October 30, 2021 10:03
.zshrc
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
@fachryansyah
fachryansyah / bash
Created May 15, 2021 14:24
registration
sudo gitlab-runner register \
--non-interactive \
--url "https://gitlab.com" \
--registration-token "<REGISTRATION_TOKEN_FROM_GITLAB>" \
--description "tester ci/cd" \
--executor "shell"
@fachryansyah
fachryansyah / bash
Created May 15, 2021 13:49
installation
$ sudo dpkg -i gitlab-runner_amd64.deb
@fachryansyah
fachryansyah / bash
Created May 15, 2021 13:45
installation
$ curl -LJO "https://gitlab-runner-downloads.s3.amazonaws.com/latest/deb/gitlab-runner_amd64.deb"
variables:
TEST_NAME: gitlab.com/viclates-kingdom/test-ci-cd:$CI_COMMIT_REF_NAME
stages:
- test
- stop
- run
testing:
stage: test
deploying-staging:
stage: deploy
script:
- echo 'Deploying $CI_PROJECT_NAME to staging'
- npm install
- ./scripts/deploy-staging.sh
only:
- staging
script:
- echo 'Running a test'
- npm install
- npm run test
tags:
- test