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
ssh-copy-id -i .ssh/id_rsa.pub -p22 pi@{your_local_ip_address} |
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
cd /home/{user_name}/Downloads/pi_sync/ #Step 2.a: Change directory | |
#Step 2.b: Change line 5 to your raspberry PI's local IP address. | |
chmod +x sync.sh #Step 2.c: Make sync.sh executable | |
mv sync.sh pi_sync #Step 2.d: Rename file | |
sudo cp sync.sh /usr/bin/ #Step 2.e: Copy file |
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
echo $(curl -s icanhazip.com) #retrieve IPv6 IP for line 4 (sync.sh) |
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
cd /home/{user_name}/Downloads/pi_sync/ |
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
/usr/bin/pi_sync |
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
SERVER_PORT=$(head -n13 /etc/ssh/sshd_config | grep "Port" | awk '{print $2}') | |
SERVER_IP=$(hostname -I | awk '{ print $1 }') | |
swaks --to [email protected] -s smtp.gmail.com:587 -tls -au [email protected] -ap PASSWORD --header "Subject: [PING] raspy $(date)" --body "IP: $SERVER_IP \nPORT: $SERVER_PORT" | |
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
<nav> | |
<ul> | |
<li><a href="">About</a></li> | |
<li><a href="">Portfolio</a></li> | |
<li><a href="">Contact</a></li> | |
</ul> | |
</nav> | |
<div> |
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
#!/usr/bin/ruby | |
# script for posting on dev.to | |
# using api-key | |
require 'net/http' | |
require 'json' | |
def read_file(fname) | |
unless File.file?("#{fname}") |
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 youtube_dl | |
import sys, os, time | |
import boto3 | |
# VERSIONS: | |
# 1. boto3==1.18.63 | |
# 2. youtube_dl==2021.6.6 | |
# | |
# How to use: |
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/sh | |
# default commands for osx to make it nicer to work with | |
########################## | |
# General UI?UX settings # | |
########################## | |
# Set hostname (hex of MVB9APPS) | |
sudo scutil --set ComputerName "0x4d56423941505053" | |
sudo scutil --set HostName "0x4d56423941505053" |
OlderNewer