Skip to content

Instantly share code, notes, and snippets.

View ijash's full-sized avatar
🍔
Royale with Cheese

Jastria Rahmat ijash

🍔
Royale with Cheese
View GitHub Profile
@ijash
ijash / instantorderindlb.md
Created October 23, 2021 10:29
insom instant order
POST {{ _.base_url }}/orders/instant-order

pake ini aja dulu lan... kalau di insom beda banget ama master branch soalnya

{
	"payment": {
		"method": "bank_transfer",
		"options": "bni"
	},
@ijash
ijash / autoupgrade
Last active June 25, 2021 03:36
Automatic upgrade apt and clean in one command. Bash or zsh compatible. For debian-based like ubuntu, kde-neon, linux mint, raspberry-os(raspbian), etc.
#!/usr/bin/env bash
# www.github.com/ijash
bold=$(tput bold)
normal=$(tput sgr0)
zshrc_file=".zshrc"
bashrc_file=".bashrc"
command_alias='autoupgrade'
update_command="alias $command_alias='sudo apt update -y && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt autoclean -y'"
/**
* dbepisodes.com open many tabs.
* open new tab(empty tab)>developer console(f12)>paste codes
* www.github.com/ijash
*/
let latestEpisode = parseInt(prompt('enter start episode', 145));
let countEp = 0;
if (openInNewTab !== undefined) {
function openInNewTab(targetDbUrl) {
let currentWindow = window.open(targetDbUrl, '_blank');
#!bin/bash
cd ~
sudo usermod -aG $USER
ln -s sf_shared_folder shared
sudo reboot
@ijash
ijash / migrasi_disk.md
Last active December 25, 2019 00:58
Cara untuk menggunakan command dd sebagai migrasi harddisk

cara migrasi HDD/SSD

  1. Di terminal, pastikan/ tentukan alamat/path ssd & harddisknya menggunakan lsblk. cari lokasi hdd/ssdnya, jangan diambil nomer belakangnya, karena itu partisi. misal /dev/sda bukan /dev/sda2.

  2. lalu bisa pake command dd untuk mulai migrasinya

    dd if=/dev/lokasiHDD of=/dev/lokasiSSD bs=64K conv=noerror,sync status=progress
    

keterangan:

Installing Java on ubuntu

Installing multiple version of java

  1. Check java version:
    java --version
    if exist, it may be version 11 and above.
  2. install another version of java (in this case java 8 openjdk):
//https://playlist.mp3-youtube-converter.org/
let downloadForm = document.querySelector('table');
let checkBoxes = downloadForm.querySelectorAll(`[type*="checkbox"]`);
let startArr = parseInt(prompt('select starting number', 'INPUT NUMBER ONLY!'));
let limitArr = 20;
let countArr = limitArr;
countArr = startArr + countArr
countArr = (countArr > checkBoxes.length ? checkBoxes.length - startArr : limitArr-1);
@ijash
ijash / ubuntu_server_fastest_mirror_trick.md
Last active July 6, 2023 15:08
Switching to nearest mirror using terminal in ubuntu server with "mirror" method.

The apt mirror method

A gem was found during my google search. Not much known as it said(at least during this writing),but works damn good.

This mirror method will automatically select the fastset mirror during apt update. based on your location. tested and running well on Ubuntu Server 18.04

  1. First, open /etc/apt/sources.list with a text editor.

sudo nano /etc/apt/sources.list

Enable root account for SSH & SFTP login

Warning: This method might be unsafe for server users.

Ubuntu doesn't allow root user and also login in ssh as root by default. But sometimes, remote sftp login has better convenience in editing the system files such as nginx config so it can be edited in GUI. As a precaution, This method is not recommended in production for security reason. So the first thing you have to do is:

  1. Enable your root user account in remote server:
    sudo passwd root
    
  2. Fill in your password.
@ijash
ijash / electronjs_install_guide_ubuntu.md
Created October 10, 2019 01:12
installation guide for electron in debian based system

guide for electron in debian based system

commands

npm i electron --save-dev --save-exact