$ 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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias gssh='gcloud compute ssh' | |
alias gci='gcloud compute instances' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shuf -zn10 -e *.txt | xargs -0 cp -vt ../targetdir/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install python | |
RUN apt-get update \ | |
&& apt-get install -y python3-pip python3-dev git \ | |
&& cd /usr/local/bin \ | |
&& ln -s /usr/bin/python3 python \ | |
&& pip3 install --upgrade pip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f -name "*.bak" -delete | |
or | |
find . -name "FILE-TO-FIND" -exec rm -rf {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Default nohup.out | |
nohup myprogram & | |
# Custom output file | |
nohup myprogram > myprogram.out & | |
# Redirect stderr to stdout | |
nohup myprogram > myprogram.out 2>&1 & | |
# Multiple commands |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
device_name = tf.test.gpu_device_name() | |
if device_name != '/device:GPU:0': | |
raise SystemError('GPU device not found') | |
print('Found GPU at: {}'.format(device_name)) | |
print("GPU Available: ", tf.test.is_gpu_available()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import concurrent.futures | |
def do(params): | |
return "hello" | |
with concurrent.futures.ThreadPoolExecutor(max_workers=5) as executor: | |
future = executor.submit(do, params) | |
for future in concurrent.futures.as_completed(future_to_url): | |
url = future_to_url[future] |
NewerOlder