sudo apt update
sudo apt upgrade
sudo apt install -y vim tree tmux npm git
Node v20
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs
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 java.io.*; | |
class Main { | |
public static void main(String[] args) { | |
String command = "ls"; | |
try { | |
Process process = Runtime.getRuntime().exec(command); | |
BufferedReader reader = new BufferedReader( | |
new InputStreamReader(process.getInputStream())); | |
String line; | |
while ((line = reader.readLine()) != null) { |
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
conf = { | |
"sqs-access-key": "", | |
"sqs-secret-key": "", | |
"sqs-queue-name": "", | |
"sqs-region": "us-east-1", | |
"sqs-path": "sqssend" | |
} | |
import boto.sqs | |
conn = boto.sqs.connect_to_region( |
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 | |
sudo mrt uninstall | |
sudo mrt uninstall --system | |
rm -rf ~/.meteorite | |
sudo rm /usr/local/bin/meteor | |
rm -rf ~/.meteor | |
sudo chown -R $(whoami) ~/.npm |
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 necessary libraries | |
import cv2 | |
import numpy as np | |
#capture video from the webcam | |
cap = cv2.VideoCapture(0) | |
#load the face finder | |
face_cascade = cv2.CascadeClassifier('/home/sm/Desktop/haarcascade_frontalface_default.xml') |
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
Clarification: There are two default shell settings. | |
One is the Unix setting and can be changed with chsh -s. | |
The other is the Terminal.app-specific setting, and can be changed in Terminal preferences. | |
You can set your Terminal default shell command to /bin/bash -l in the Terminal app. | |
-l tells Bash to read startup files. Even if you don't have any user-specific startup files, there are system-wide startup files that will, among other things, set the prompt to the one you're familiar with. | |
If you've properly set your Unix default shell, you should be able to select Default login shell in Terminal preferences and this will happen automatically. |
find . -maxdepth 1 -name "*.pdf" -print0 | xargs -0 rm