Skip to content

Instantly share code, notes, and snippets.

View vonthecreator's full-sized avatar
☢️
loading...

Munashe vonthecreator

☢️
loading...
  • Canada
View GitHub Profile
ssh-copy-id -i .ssh/id_rsa.pub -p22 pi@{your_local_ip_address}
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
echo $(curl -s icanhazip.com) #retrieve IPv6 IP for line 4 (sync.sh)
cd /home/{user_name}/Downloads/pi_sync/
/usr/bin/pi_sync
@vonthecreator
vonthecreator / headless_pi.sh
Last active August 11, 2020 21:41
Sends and email with local host IP & SSH port when a WIFI connection is established.
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"
@vonthecreator
vonthecreator / index.html
Created August 23, 2020 16:16
munazhe.media
<nav>
<ul>
<li><a href="">About</a></li>
<li><a href="">Portfolio</a></li>
<li><a href="">Contact</a></li>
</ul>
</nav>
<div>
#!/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}")
@vonthecreator
vonthecreator / main.py
Last active November 7, 2021 13:17
youtube_dl learns how to upload to S3 buckets
import youtube_dl
import sys, os, time
import boto3
# VERSIONS:
# 1. boto3==1.18.63
# 2. youtube_dl==2021.6.6
#
# How to use:
#!/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"