Skip to content

Instantly share code, notes, and snippets.

View harisfi's full-sized avatar
🎯
Focusing

Haris F. harisfi

🎯
Focusing
View GitHub Profile
buying maint lug_boot safety class
vhigh vhigh small low unacc
vhigh vhigh small med unacc
vhigh vhigh small high unacc
vhigh vhigh med low unacc
vhigh vhigh med med unacc
vhigh vhigh med high unacc
vhigh vhigh big low unacc
vhigh vhigh big med unacc
vhigh vhigh big high unacc
@harisfi
harisfi / 1.kt
Created October 4, 2023 06:31
T6
package com.hryzx.interactionhandlingexample
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.interaction.collectIsPressedAsState
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
@harisfi
harisfi / 8puzzle.txt
Created September 14, 2023 01:21
8puzzle.txt
h1 = 5
d1 = |2-0|+|2-0| = 4
d2 = |0-0|+|1-1| = 0
d3 = |2-0|+|1-2| = 3
d4 = |0-1|+|2-0| = 3
d5 = |1-1|+|1-1| = 0
d6 = |1-1|+|2-2| = 0
d7 = |0-2|+|0-0| = 2
d8 = |2-2|+|0-1| = 1
@harisfi
harisfi / postgresql-pgadmin4.md
Last active October 27, 2022 15:26
Script for starting and stopping postgresql service and pgadmin4

Script for starting and stopping postgresql service and pgadmin4

Place code below in pgadmin4 directory, set each file permission to executable, and you can use it.


start.sh

#!/bin/sh

sudo systemctl start postgresql
mongodump --uri "mongodb+srv://<your username>:<your password>@<your cluster>.mongodb.net/sample_supplies"
mongoexport --uri="mongodb+srv://<your username>:<your password>@<your cluster>.mongodb.net/sample_supplies" --collection=sales --out=sales.json
mongorestore --uri "mongodb+srv://<your username>:<your password>@<your cluster>.mongodb.net/sample_supplies" --drop dump
mongoimport --uri="mongodb+srv://<your username>:<your password>@<your cluster>.mongodb.net/sample_supplies" --drop sales.json
@harisfi
harisfi / splitTraffic.js
Created September 3, 2021 15:55
Split large traffic into pieces, so there will no more server down :)
function splitTraffic() {
const origServerList = [
'server1',
'server2',
'server3',
'server4',
];
const serverCount = origServerList.length;
const firstServer = origServerList[Math.floor(Math.random() * serverCount)];
let modServerList = origServerList.filter(serv => serv !== firstServer);
=== COMPETITION ===
// coming soon
https://hology.ub.ac.id/
https://www.arkavidia.id/
// active
http://creanomic.ub.ac.id/
https://www.compfest.id/
https://ittoday.id/
for(let i = 1; i <= 28; i++) {
var radio = document.getElementsByName(i)
for(let j=0; j<radio.length; j++) {
if(radio[j].value == 5) {
radio[j].checked = true
}
}
}
document.getElementById('saran').value = 'Pembelajaran sangat baik! Terima kasih atas materi yang disampaikan. Mohon maaf sebesar-besarnya apabila saya banyak salah.'
1.Run git clone <my-cool-project>
2.Run composer install
3.Run cp .env.example .env
4.Run php artisan key:generate
5.Run php artisan migrate
6.Run php artisan serve
7.Go to link localhost:8000
@harisfi
harisfi / 00_etc-hosts.md
Created April 5, 2021 14:10 — forked from mul14/00_etc-hosts.md
/etc/hosts for Vimeo, Reddit, and Imgur.

Unblock Vimeo, Reddit, Imgur, dan NPM

Saya support Internet Positif untuk memblokir porn, situs judi, dan hal-hal ilegal lainnya. Tapi pemerintah dan ISP sangat konyol karena tidak mengizinkan akses ke Vimeo, Reddit, Imgur, Netflix--yang mana bukanlah situs dengan konten utama ilegal.

Linux / BSD / macOS

Tambahkan list di bawah ke /etc/hosts.

Windows