Skip to content

Instantly share code, notes, and snippets.

View moeiscool's full-sized avatar
💭
Find me on Gitlab.com!

Moe moeiscool

💭
Find me on Gitlab.com!
View GitHub Profile
@moeiscool
moeiscool / ffmpegToWeb.js
Last active February 19, 2024 21:58
FLV Live Stream to Web Page with flv.js, FFMPEG, and Express Web Server (Node.js)
// Shinobi (http://shinobi.video) - FFMPEG FLV over HTTP Test
// How to Use
// 1. Navigate to directory where this file is.
// 2. Run `npm install express`
// 3. Start with `node ffmpegToWeb.js`
// 4. Get the IP address of the computer where you did step 1. Example : 127.0.0.1
// 5. Open `http://127.0.0.1:8001/` in your browser.
var child = require('child_process');
var events = require('events');
@moeiscool
moeiscool / ffmpegToWeb.js
Last active January 25, 2024 21:47
FFMPEG to Web Browser with Express, Socket.IO and JSMPEG
// Shinobi (http://shinobi.video) - FFMPEG H.264 over HTTP Test
// How to Use raw H.264 (Simulated RTSP)
// 1. Start with `node ffmpegToWeb.js`
// 2. Get the IP address of the computer where you did step 1. Example : 127.0.0.1
// 3. Open VLC and "Open Network Stream".
// 4. Input the following without quotes : `http://127.0.0.1:8001/h264` and start.
var child = require('child_process');
var io = require('socket.io');
var events = require('events');
@moeiscool
moeiscool / part1.sh
Last active January 15, 2024 14:41
Install XMRig with GPU support Quick and Easy on Ubuntu 20.04
echo "Installing dependencies"
sudo apt install gcc-7 g++-7 cmake git -y
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 800 --slave /usr/bin/g++ g++ /usr/bin/g++-7
echo "============="
echo "Installing Node.js : For using PM2 daemon manager"
wget https://deb.nodesource.com/setup_12.x
chmod +x setup_12.x
./setup_12.x
sudo apt install nodejs -y
@moeiscool
moeiscool / amcrestVideoScraper.js
Last active December 12, 2023 02:47
Amcrest Camera Mass (Bulk) Video Exporter with Web Browser Console
/// How it works :
/// This script will download videos from your Amcrest Camera automatically (automate cumbersome task of individually clicking download on each video)
/// Limitation is that it will stop downloading when it reaches the end of the month.
/// HOW TO USE :
// 1. Login to Amcrest camera and click Playback tab.
// 2. Select Day of the Month to begin downloading from.
// 3. Open the Web Browser Console. (CTRL + SHIFT + C on Mac)
// 4. Paste this entire script in the execution field and run it.
// 5. You will see the files start downloading.
@moeiscool
moeiscool / README.md
Last active March 12, 2023 04:39
Run PHP Site in Node.js with Express Web Server and node-php

Installing MariaDB and Creating a user

You must be root to follow the steps in this guide.

  1. Download and Install MariaDB. MariaDB is used in place of MySQL.
sudo apt-get install mariadb-server mariadb-client
  1. Set it up to run on boot.
@moeiscool
moeiscool / README.md
Last active January 10, 2022 08:28
Browser-Based Buy Bot for BestBuy Xbox Series X or PS5

Browser-Based Buy Bot for BestBuy Xbox Series X or PS5 (Tested on BestBuy.ca)

This is not made for scalping. It is made for people who just want a dang console.

I made this to run in my Google Chrome web browser. You will need to leave a tab open. When the console is seen as available it will be added to your cart, default confirmations will be selected then you will be brought to the payment information page. Once it makes it to the payment information page a sound will play and an alert popup will appear.

If it is out of stock it will just wait 2 minutes and refresh.

This script will not complete any checkout processes. It will not process any purchases against your payment information. It only gets you to the payment information input page.

@moeiscool
moeiscool / gist:4a7776bb90f12496bd797ceb85ca0ba8
Last active September 2, 2021 05:12
Install Node.js 12 on Ubuntu 20.04
wget https://deb.nodesource.com/setup_12.x
chmod +x setup_12.x
./setup_12.x
sudo apt install nodejs make gcc-8 g++-8 -y
sudo apt install node-pre-gyp -y
rm setup_12.x
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8
@moeiscool
moeiscool / install-pptp-vpn-server.sh
Created January 25, 2019 05:25
Install PPPTP VPN Server on Ubuntu 18.04
echo "======================="
echo "Installing PPTP VPN Server..."
echo "======================="
apt install pptpd -y
echo "Setting VPN Server IP : localip 172.16.0.1"
if grep -q "localip 172.16.0.1" /etc/pptpd.conf; then
echo "Already set."
else
sed -i 's/localip/#localip/g' /etc/pptpd.conf
echo "localip 172.16.0.1" >> /etc/pptpd.conf
@moeiscool
moeiscool / nodeJs.crypto.calculatingHash.js
Last active April 23, 2021 12:21 — forked from GuillermoPena/nodeJs.crypto.calculatingHash.js
NodeJS - CRYPTO : How to calculate a hash from file or string
var crypto = require('crypto')
, fs = require('fs')
// Algorithm depends on availability of OpenSSL on platform
// Another algorithms: 'sha1', 'md5', 'sha256', 'sha512' ...
var algorithm = 'sha1'
, shasum = crypto.createHash(algorithm)
// Updating shasum with file content
var filename = __dirname + "/anything.txt"
@moeiscool
moeiscool / ffmpegToWeb.js
Last active March 18, 2021 09:39
Streaming H.264 (RTSP Camera Stream Data from FFMPEG) over HTTP
// Shinobi (http://shinobi.video) - FFMPEG H.264 over HTTP Test
// How to Use
// 1. Start with `node ffmpegToWeb.js`
// 2. Get the IP address of the computer where you did step 1. Example : 127.0.0.1
// 3. Open VLC and "Open Network Stream".
// 4. Input the following without quotes : `http://127.0.0.1:8001` and start.
var child = require('child_process');
var events = require('events');
var spawn = child.spawn;