Skip to content

Instantly share code, notes, and snippets.

View mrrizkin's full-sized avatar
🤠
terbentur - terbentur - terbentuk

Rizki Nugraha mrrizkin

🤠
terbentur - terbentur - terbentuk
View GitHub Profile
@mrrizkin
mrrizkin / DeleteAllClaudeAiChats.md
Created July 26, 2024 02:47 — forked from Jalalx/DeleteAllClaudeAiChats.md
Script to delete Claude AI conversations history without any dependency or using external tool.

What is this?

You want to delete all your conversations with Claude AI, but there is no button to clean them by one click (Like what ChatGPT has). Using this instructions, you can clean all conversations. No dependency or external tool is needed (except your Google Chrome browser!)

To delete all chats with the Claude AI:

  1. Open Google Chrome and go to https://claude.ai
  2. Login to your account and start a new chat conversation
  3. Open DevTools and go to the Network tab
  4. You need to find the origanization id. Paste the https://claude.ai/api/bootstrap in the Filter input to find the calls to that URL. If you could not find it, reload the page. Also make sure you are selecting the "All" type. You will see calls that contain a uuid in the url which is your organization id.
  5. Now move to the Console tab and then paste the following two functions:

function deleteConversation(organizationID, uuid) {

#! /usr/bin/env bash
# Function to display usage
usage() {
echo "Usage: $0 [--from-commit=<commit1> | -f <commit1>] [--to-commit=<commit2> | -t <commit2>] [--feature=<feature> | -F <feature>] <commit1> <commit2> <feature>"
exit 1
}
# Initialize variables
commit1=""
@mrrizkin
mrrizkin / debug_helper.php
Created June 11, 2024 02:18
used to dd in laravel? now you have it on native php
<?php
defined('BASEPATH') or exit('No direct script access allowed');
if (!function_exists('dd')) {
function highlight_code($text)
{
ini_set("highlight.comment", "c-comment");
ini_set("highlight.default", "c-default");
ini_set("highlight.html", "c-default");
@mrrizkin
mrrizkin / install_postgres.sh
Created May 17, 2024 14:03
Install PostgreSQL on ubuntu
#!/usr/bin/env bash
# Check if PostgreSQL version argument is provided
if [ -z "$1" ]; then
echo "Usage: $0 <postgresql_version>"
exit 1
fi
postgresql_version=$1
@mrrizkin
mrrizkin / install_php.sh
Created May 17, 2024 14:02
Install php on ubuntu
#!/usr/bin/env bash
# Check if PHP version argument is provided
if [ -z "$1" ]; then
echo "Usage: $0 <php_version>"
exit 1
fi
php_version=$1
@mrrizkin
mrrizkin / start-ssh-agent.sh
Created February 28, 2024 01:59
A Simple script to start ssh agent using gcr-ssh-agent "Gnome Keyring"
#!/usr/bin/env bash
# Check if ssh-agent process is already running
if pgrep -x "gcr-ssh-agent" > /dev/null; then
echo "SSH Agent is already running"
exit 0
fi
BASEDIR=/tmp/ssh-agent
@mrrizkin
mrrizkin / compress-img.js
Created October 23, 2023 06:46
Image compress using canvas html5 javascript
function compressImage(file, quality = 0.7, reduceSize = 0.8) {
return new Promise((resolve, reject) => {
if (!file) {
reject(Error('File is not exist'));
}
const reader = new FileReader();
reader.onload = function(e) {
const img = new Image();
img.src = e.target.result;
type SQLQuery<T> = {
select: (keyof T)[]
from: string
join: JoinQuery<T>[]
where: (WhereQuery<T> | NestedWhereQuery<T>)[]
limit: number
order: string
}
type JoinQuery<T> = {
@mrrizkin
mrrizkin / node-updater.sh
Created February 6, 2023 07:45
check and update spesified package, and restart pm2 daemon
#! /usr/bin/env bash
# Usage: node-updater.sh <package name> <pm2 pid> <path to node project>
# Example: node-updater.sh whatsappjs 1234 /var/www/whatsappjs
name="$1"
pid="$2"
path="$3"
check_required() {
@mrrizkin
mrrizkin / disk_usage
Last active January 30, 2023 00:51
get total space used on spesific date
#! /usr/bin/env bash
# usage: disk_usage [path] [year] [month] [day]
path=$1
year=$2
month=$3
day=$4
totalSize=0