Skip to content

Instantly share code, notes, and snippets.

View willnode's full-sized avatar

Wildan M willnode

View GitHub Profile
<?php
namespace App\Libraries;
use App\Entities\User;
use App\Entities\Purchase;
use Config\Services;
use WpOrg\Requests\Requests;
/**
@willnode
willnode / gemastik-0.md
Last active May 11, 2024 16:55
Soal Penyisihan Competitive Programming - Gemastik 11

1. Urutan Aneh

Deskripsi

Buatlah program yang melakukan pengurutan N (2≤N≤1000) buah bilangan seperti pada contoh kasus di bawah ini.

Format Masukan

  • Baris pertama berisi satu buah bilangan N.
@willnode
willnode / redox_m1.md
Last active April 10, 2024 11:38
Build Redox OS in MacOS Apple Silicon

This is a way to compile Redox OS in MacOS Apple Silicon without using podman.

Clone

git clone --recurse-submodules https://gitlab.redox-os.org/redox-os/redox.git
cd redox

Additional brew installs & deps

@willnode
willnode / install-medusa-no-tty.sh
Last active March 11, 2024 04:53
install medusa.js without interactive prompts
#!/usr/bin/expect -f
# Check if the correct number of arguments is provided
if { $argc != 2 } {
puts "Usage: $argv0 <npx_command_arguments> <admin_email>"
exit 1
}
# Set timeout for expect
set timeout -1
@willnode
willnode / install.md
Last active March 4, 2024 12:22
Build Redox for Aarch64 OS Guide

[WIP] Building Aarch64 Redox OS from Mac/Windows

I recommend to spawn a Virtualized Ubuntu. I'm coming from M1 Macbook but I hate building from Podman.

I run with UTM on QEMU virtualization, with 6 CPU, 6 GB RAM and 100 GB disk space. It works for me.

Cloning

cd ~/Document
@willnode
willnode / restart.sh
Created January 4, 2024 10:44
DOM Cloud's restart script
#!/bin/bash
while [ `passenger-config list-instances --json | jq length` -ne 1 ]; do
echo "Waiting until NGINX done reloading..."
sleep 1
done
sudo -n -- passenger-config reopen-logs &> /dev/null || true
passenger-config restart-app ~ --ignore-app-not-running
@willnode
willnode / index.html
Created November 16, 2023 22:07
DOM Cloud's default index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Welcome!</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
text-align: center;
font-family: "Segoe UI", Roboto, sans-serif;

Install XCode via terminal

sudo xcodebuild -runFirstLaunch
@willnode
willnode / forward-domain-nginx.conf
Created May 26, 2023 14:39
Example of NGINX implementation for forwarddomain.net
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
@willnode
willnode / kramdown_playground
Last active May 16, 2023 07:50
Kramdown Playground
<!-- This is HTML comment, but works well anyway -->
<!-- See http://wellosoft.net/blog/en/2017/hello-world.html for preview -->
## The playground
#### Not yet
###### Yet ...
***
<br>
Now, you may see an `inline code` or _italic_ or **bold** or ~~striking~~ texts.