Skip to content

Instantly share code, notes, and snippets.

View muhammadyana's full-sized avatar
🏠
Work From Anywhere

Muhammad Yana Mulyana muhammadyana

🏠
Work From Anywhere
View GitHub Profile

P2P Ridehailing App — Claude Code Instructions

You are building a fully decentralized peer-to-peer ridehailing mobile app. Zero centralized servers. The entire system runs on user devices and the Solana blockchain.

Core Flow

  1. A rider opens the app, sets a destination, and the app calculates a fare client-side using Haversine distance.
  2. The rider posts a ride request on-chain containing a blinded zone ID (ZK proof of zone membership), the offered fare, and escrowed SOL.
  3. Nearby drivers discover the request via libp2p GossipSub and on-chain queries.
  4. Drivers submit offers on-chain — they can accept the rider's fare or counter-offer (capped at 2x the rider's price).
openapi: 3.1.0
x-stoplight:
id: k6y74gefyakdi
info:
title: authenticated-api
version: '1.0'
contact:
name: Muhammad Yana Mulyana
url: 'https://muhammadyana.me'
email: [email protected]
@muhammadyana
muhammadyana / install-postgresql-on-mac.md
Last active March 28, 2023 23:03
Install postgresql in mac using homebrew
brew install postgresql@14
brew services start postgresql@14
psql postgres

# Optional
cd /usr/local/var/
rm -rf postgres
initdb /usr/local/var/postgres
@muhammadyana
muhammadyana / deploy_react_with_ec2_capistrano.MD
Last active July 22, 2022 03:32
Deploying React Application to Amazon EC2 with Capistrano, Github Action & Nginx

INSTALL NODE JS & YARN

Install NVM

curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.bashrc

Install node js 14

@muhammadyana
muhammadyana / setup-rails-in-ubuntu-server.md
Last active June 28, 2022 10:45
Setup ruby on rails and required in ubuntu

INSTALL ZSH

sudo apt install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
@muhammadyana
muhammadyana / Activate Office 2019 for macOS VoL.md
Created June 16, 2022 20:00 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@muhammadyana
muhammadyana / README.md
Created April 16, 2022 16:32 — forked from danirod/README.md
nginx + systemd + puma
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import ElementClickInterceptedException, NoSuchElementException
from time import sleep
from selenium.common.exceptions import NoSuchElementException
EMAIL = "[email protected]"
PASSWORD = "password"
@muhammadyana
muhammadyana / rails_model_bes_practice.rb
Created February 22, 2022 03:17
Rails model best practice
# Extends ...................................................................
# Includes ..................................................................
# Variables .................................................................
# Fields (If use mongo) .....................................................
# Relationships .............................................................
# Validations ...............................................................
# Callbacks .................................................................
# Scopes ....................................................................
# Uploaders .................................................................
# Additional config (i.e. accepts_nested_attributes_for etc...) .............
@muhammadyana
muhammadyana / clean_code.md
Created February 22, 2022 03:16 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules