Skip to content

Instantly share code, notes, and snippets.

View aerphanas's full-sized avatar
🛑
all interaction go to codeberg

Muhammad Aviv Burhanudin aerphanas

🛑
all interaction go to codeberg
View GitHub Profile
@aerphanas
aerphanas / .gitignore
Last active December 15, 2023 09:25
Group 1
__pycache__
@aerphanas
aerphanas / spam.lisp
Last active April 7, 2023 03:53
spam with xdotolls
#!/usr/bin/env -S sbcl --script
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
(defun main ()
(let ((counter 0))
(loop
@aerphanas
aerphanas / main.rs
Last active March 23, 2023 05:07
animate text
use std::io::{self, Write};
use std::time::{Instant, Duration};
use std::thread;
fn main() {
let time: Instant = Instant::now();
let text: &str = "Marhaban ya Ramadhan";
let mut is_up: bool = true;
let mut current_index: usize = 0;
@aerphanas
aerphanas / index.html
Created March 10, 2023 03:42
notfound
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>Quarkus</center>
</body>
</html>
From e8bbace06f13e4d519396d604b93432a845a3bd8 Mon Sep 17 00:00:00 2001
From: Muhammad Aviv Burhanudin <muhamadaviv14@gmail.com>
Date: Mon, 6 Mar 2023 22:16:55 +0700
Subject: [PATCH] fix connection
Signed-off-by: Muhammad Aviv Burhanudin <muhamadaviv14@gmail.com>
---
rest-json-quickstart/pom.xml | 8 ++++++++
rest-json-quickstart/src/main/java/Product.java | 3 +++
rest-json-quickstart/src/main/java/ProductResource.java | 5 +----
@aerphanas
aerphanas / Main.hs
Created February 23, 2023 06:30
GetOpts
import System.Console.GetOpt
import System.Environment
data Options = Options
{ optVerbose :: Bool
, optInputFile :: Maybe FilePath
, optOutputFile :: Maybe FilePath
} deriving (Show)
defaultOptions :: Options
@aerphanas
aerphanas / main.c
Created February 13, 2023 08:56
Counter Spam
#include <stdio.h>
#include <curl/curl.h>
#define TO 100
#define URL "https://google.com"
int
main()
{
for(size_t i = 0;i < TO;i++)
@aerphanas
aerphanas / java.org
Created February 11, 2023 07:14
Java pass by reference

pass by reference example 1

public class PassbyRefOne {
    int a = 10;
    void addTen(PassbyRefOne num){
        num.a = num.a + 10;
    }
    public static void main(String[] args) {
        PassbyRefOne x = new PassbyRefOne();
@aerphanas
aerphanas / ayahs.cr
Created January 2, 2023 06:14
generate a tuple that contains the number of verses of the Koran
require "http/client"
require "json"
url = "https://quranapi.idn.sch.id/surah/"
target = 114
print "{"
target.times do | x |
request = HTTP::Client.get(url + (x+1).to_s)
response = JSON.parse(request.body)["numberOfAyahs"]
@aerphanas
aerphanas / factorial.java
Created December 26, 2022 08:32
factorial
import java.util.Scanner;
import java.util.function.Function;
public class Factorialf
{
// Declare the factorialFn variable outside the factorial method
static Function<Integer, Integer> factorialFn = new Function<Integer, Integer>() {
@Override
public Integer apply(Integer x) {
if (x == 0) {