Skip to content

Instantly share code, notes, and snippets.

View NuroDev's full-sized avatar
🌈

Ben NuroDev

🌈
View GitHub Profile
@NuroDev
NuroDev / raspbian_setup_pms.sh
Last active February 9, 2020 16:56
Script to download and install Plex Media Server for Raspberry Pi
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install apt-transport-https -y && wget -O - https://dev2day.de/pms/dev2day-pms.gpg.key | sudo apt-key add - && echo "deb https://dev2day.de/pms/ jessie main" | sudo tee /etc/apt/sources.list.d/pms.list && sudo apt-get update && sudo apt-get install -t jessie plexmediaserver && sudo rm -rf /etc/default/plexmediaserver && echo
# default script for Plex Media Server
# the number of plugins that can run at the same time
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
# ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE
PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000
# where the mediaserver should store the transcodes
@NuroDev
NuroDev / raspbian_setup_samba.sh
Last active September 4, 2017 20:46
Script to download and install Samba for Raspberry Pi
sudo apt-get install samba samba-common-bin -y
@NuroDev
NuroDev / raspbian_setup_nextcloud.sh
Last active June 22, 2019 22:15
Script to download and install NextCloud for Raspberry Pi
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install apache2 php5 php5-gd sqlite php5-sqlite php5-curl -y && sudo service apache2 restart && cd /var/www/html && sudo wget https://download.nextcloud.com/server/releases/nextcloud-12.0.2.zip && sudo unzip -q nextcloud-12.0.2.zip && sudo rm -rf ./nextcloud-12.0.2.zip && sudo mkdir -p /var/www/html/nextcloud/data && sudo chown www-data:www-data /var/www/html/nextcloud/data && sudo chmod 750 /var/www/html/nextcloud/data && cd /var/www/html/nextcloud && sudo chown www-data:www-data config apps && sudo reboot
@NuroDev
NuroDev / keybase.md
Created February 1, 2018 13:11
keybase.md

Keybase proof

I hereby claim:

  • I am nurodev on github.
  • I am nurodev (https://keybase.io/nurodev) on keybase.
  • I have a public key ASBgX1bDMDjLlEoRgHUNg9iTXQNwFSn2fh_nFWSOalZXSAo

To claim this, I am signing this object:

@NuroDev
NuroDev / .env
Last active October 7, 2018 14:42
Raspberry Pi - Home Network Stack | Portainer, Pi-hole, Gateway
# Host directory paths
portainer_dir=dir_name/
pihole_dir=dir_name/
dnsmasq_dir=dir_name/
gateway_dir=dir_name/
# Other
server_ip=ip_address
@NuroDev
NuroDev / .env
Created October 6, 2018 21:22
Raspberry Pi - Home Media Stack | Muximux, Plex, PlexRequests, Sonarr, Radarr, NZBGet, Deluge
# Host directory paths
config_dir=/mnt/Pi/config/
downloads_dir=/mnt/Pi/downloads/
media_dir=/mnt/Pi/media/
@NuroDev
NuroDev / Cargo.toml
Created January 18, 2020 21:13
🖼 Cosmo - A simple twitter bot to upload/download an image repeatedly. Used to analyze Twitter image compression results
[package]
name = "cosmo"
version = "1.1.1"
authors = ["N U R O ™"]
edition = "2018"
[dependencies]
egg-mode = "0.13.0"
failure = "0.1.6"
reqwest = "0.9.22"
@NuroDev
NuroDev / Cargo.toml
Created August 4, 2020 19:59
📸 Hubble - A simple twitter bot to screenshot a set number of a users tweets
[package]
name = "hubble"
version = "1.1.1"
authors = ["N U R O ™"]
edition = "2018"
[dependencies]
egg-mode = "0.13.0"
failure = "0.1.6"
headless_chrome = "0.9.0"
@NuroDev
NuroDev / generateOtp.ts
Last active April 6, 2022 16:27
🔑 Generate OTP - A simple TypeScript function to generate a one-time passcode (OTP)
import { randomInt } from "crypto";
interface GenerateOtpOptions {
/**
* Chars
*
* @description Whether to include A-Z characters in the generated passcode
*
* @default true
*/
@NuroDev
NuroDev / Animate.component.tsx
Last active April 28, 2022 15:43
🎢 Animate - A small wrapper component for the `motion` library to make it easier to use with React.js
/**
* Note: Requires the following dependencies:
* - `motion`
* - `react-use`
* - `is-web-crawler`
*/
import { animate, spring } from 'motion'
import { isCrawlerUserAgent } from 'is-web-crawler'
import { useEffect, useRef } from 'react'