Skip to content

Instantly share code, notes, and snippets.

@shivasiddharth
shivasiddharth / Streama-Rpi-Setup.sh
Last active December 29, 2021 11:15
Script to setup Streama on raspberry Pi
#!/bin/bash
sudo apt-get install openjdk-8-jre openjdk-8-jdk -f -y
mkdir -p /home/${USER}/streama/data
cd /home/${USER}/streama/
wget -c https://gist.githubusercontent.com/shivasiddharth/f657e89c7ad00f441421278291b9ebf8/raw/2f5b2d94ae45b72fac2b0fb32a5bb9be21f0649a/streama_application.yml -O application.yml
wget -c https://github.com/streamaserver/streama/releases/download/v1.10.3/streama-1.10.3.jar -O server.jar
read -p "Do you wish to set the server to autostart on boot?" yn
case $yn in
@shivasiddharth
shivasiddharth / BlynkLocalSample.ino
Created December 7, 2021 15:03
Sample sketch for demonstrating ESP connection to Blynk local server.
/*************************************************************
Download latest Blynk library here:
https://github.com/blynkkk/blynk-library/releases/latest
Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
You can easily build graphic interfaces for all your
projects by simply dragging and dropping widgets.
Downloads, docs, tutorials: http://www.blynk.cc
@shivasiddharth
shivasiddharth / gist:1c457e62413e7a1441dcab11b0fe7757
Created November 14, 2021 14:38
Fix Kodi Raspberry Pi OS No installation candidate issue
sudo sh -c "echo 'deb http://ftp.us.debian.org/debian/ bullseye main contrib non-free' >> /etc/apt/sources.list"
sudo sh -c "echo 'deb http://deb.debian.org/debian bullseye main contrib non-free' >> /etc/apt/sources.list"
sudo apt-get update
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys XXXXXXXXXXXX
Replace XXXXXXXXXX with the first alphanumeric key.
sudo apt-get update
sudo apt-get install kodi
@shivasiddharth
shivasiddharth / pi_encoder_volume.py
Last active September 3, 2022 20:09
Code to control your Pi volume using a Rotary Encoder
#***************************************************************************************
# Code for Controlling Pi Volume Using Rotary Encoder
# Original Code: https://bit.ly/2OcaQGq
# Re-Written by Sid for Sid's E Classroom
# https://www.youtube.com/c/SidsEClassroom
# All text above must be included in any redistribution.
# If you find this useful and want to make a donation -> https://paypal.me/sidsclass
# ***************************************************************************************
from RPi import GPIO
@shivasiddharth
shivasiddharth / minidigitalframe.ino
Created January 7, 2021 15:33
Arduino Sketch for Digital Photo Frame Project
/**************************************************************************************
Code for DIY Digitial Photoframe using Wemos D1 Mini and Adafruit 1.44" TFT Display
Written by Sid for Sid's E Classroom
https://www.youtube.com/c/SidsEClassroom
Arduino Libraries Used
1. ArduinoJson – 5.13.5
2. Adafruit ST7735 and ST7739 Library – 1.6.0
3. Adafruit GFX Library – 1.10.4
4. TFT – 1.2.1
@shivasiddharth
shivasiddharth / Nextcloud-steps.text
Last active November 22, 2020 05:38
How to install Nextcoud in Raspberry, Linux Mint or other Linux based systems.
1. Install snap:
#Do not worry if the below command says no file or directory
sudo rm /etc/apt/preferences.d/nosnap.pref
sudo apt-get update
sudo apt-get install snapd
#For Raspberry Pi Users alone:
sudo nano /etc/ld.so.preload
Comment the line that says /usr/lib/arm-linux-gnueabihf/libarmmem.so
sudo snap install snap-store
@shivasiddharth
shivasiddharth / videoscript.sh
Created November 11, 2020 09:45
Script to make mp4 video Da Vinci Resolve Compatible in Linux
#!/bin/bash
for f in *.mp4;
do ffmpeg -i "$f" -c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -c:a pcm_s16le -preset ultrafast -f mov "$f".mov
done
@shivasiddharth
shivasiddharth / stremio-mint-ubuntu-install.sh
Last active February 17, 2023 12:47
Script to install Stremio on Linux mint
#!/bin/bash
clear
cd /home/${USER}/Downloads/
echo "Lets get entertained....................."
echo ""
wget "https://dl.strem.io/shell-linux/v4.4.116/stremio_4.4.116-1_amd64.deb"
sudo dpkg -i stremio_4.4.116-1_amd64.deb
wget "http://archive.ubuntu.com/ubuntu/pool/universe/x/x264/libx264-152_0.152.2854+gite9a5903-2_amd64.deb"
sudo dpkg -i libx264-152_0.152.2854+gite9a5903-2_amd64.deb
@shivasiddharth
shivasiddharth / Google Assistant Windows
Last active May 25, 2021 16:21
Hints to install google assistant in windows
pip3 install google-assistant-grpc==0.3.0
pip3 install google-assistant-sdk==0.6.0
pip3 install google-assistant-sdk[samples]==0.6.0
google-oauthlib-tool --scope https://www.googleapis.com/auth/assistant-sdk-prototype --scope https://www.googleapis.com/auth/gcm --save --headless --client-secrets $credname
@shivasiddharth
shivasiddharth / ffmpeg-rtmp-streaming
Created June 21, 2020 13:53
Sample commands to stream Pi webcam video to RTMP sink
# Command for streaming USB Webcam to RTMP sink without audio
/usr/bin/ffmpeg -y -f v4l2 -video_size 640x480 -framerate 25 -i /dev/video0 -vcodec h264_omx -f flv rtmp://localhost/show/stream
# Command for streaming USB Webcam to RTMP sink with audio
/usr/bin/ffmpeg -y -f v4l2 -video_size 640x480 -framerate 25 -i /dev/video0 -vcodec h264_omx -c:a aac -b:a 160k -ar 44100 -f flv rtmp://localhost/show/stream