Skip to content

Instantly share code, notes, and snippets.

View heartonbit's full-sized avatar

Minkyu Shim heartonbit

View GitHub Profile
@heartonbit
heartonbit / gist:dea706c49a713f6c36c23f10abce2cd6
Created December 29, 2020 16:25
Select a certain number of files randomly and copy them to a specific location
shuf -zn10 -e *.txt | xargs -0 cp -vt ../targetdir/
@heartonbit
heartonbit / alias
Created April 4, 2021 07:38
GCP Alias
alias gssh='gcloud compute ssh'
alias gci='gcloud compute instances'
@heartonbit
heartonbit / fix_ghost_neo4j_proc.md
Created June 13, 2021 08:56
Fix ghost Neo4j process issue
$ sudo neo4j status`
Neo4j is not running
`$ sudo ps -aux | grep org.neo4j.server.CommunityEntryPoint | head -n1 | awk -F ' ' '{print $2}' | sudo tee /var/run/neo4j/neo4j.pid`
24831
$ sudo neo4j status
Neo4j is running at pid 24831
$ sudo neo4j stop
Stopping Neo4j.. stopped
$ sudo neo4j start
@heartonbit
heartonbit / uninstall_ollama.sh
Created December 16, 2024 16:00
ollama uninstallation bash script
#!/bin/bash
# Define colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
echo -e "${BLUE}🤖 Ollama Uninstallation Script${NC}"
@heartonbit
heartonbit / sshkey.sh
Created December 23, 2024 11:14
Script to generate SSH key for GitHub
#! /bin/bash
# Script to generate SSH key for GitHub
# Usage: ./sshkey.sh <email>
# Set colors for output
declare -A colors=(
["red"]='\e[31m'
["green"]='\e[32m'
["cyan"]='\e[36m'
["yellow"]='\e[33m'