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 / 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 / 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 / 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 / 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 / build.sh
Created November 18, 2020 01:54 — forked from Forst/build.sh
Ubuntu ISO with preseed.cfg generation script
#!/bin/bash
## FORSTWOOF UBUNTU PRESEED :: BUILD SCRIPT
# Quit on first error
set -e
# Temporary directory for the build
TMP="/var/tmp/ubuntu-build"
@moeiscool
moeiscool / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Created November 11, 2020 17:18 — forked from Brainiarc7/VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".

@moeiscool
moeiscool / compile-ffmpeg-nvenc.sh
Last active October 10, 2020 22:12
This bash script will compile a static Ffmpeg build with NVENC and VAAPI hardware-accelerated support on Ubuntu in your home directory. You can modify the script to customize the build options as you see fit.
#!/bin/bash
#This script will compile and install a static ffmpeg build with support for nvenc un ubuntu.
#See the prefix path and compile options if edits are needed to suit your needs.
# This script assumes you have NVIDIA Drivers and CUDA Toolkit installed already
#install required things from apt
installLibs(){
echo "Installing prerequisites"
@moeiscool
moeiscool / sshPasswordLessLogin.sh
Created October 3, 2020 03:48
Quickly Enable Passwordless Login for SSH with an RSA Key (Must already have Key generated)
PUBLICKEY="YOUR_PUBLIC_KEY_HERE"
echo "ssh-rsa $PUBLICKEY" >> ~/.ssh/authorized_keys
cat ~/.ssh/authorized_keys
sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config
sed -i 's/ChallengeResponseAuthentication yes/ChallengeResponseAuthentication no/g' /etc/ssh/sshd_config
sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config
service sshd restart
@moeiscool
moeiscool / superBasicProxy.js
Created September 14, 2020 18:41
superBasicProxy.js
const request = require('request')
const express = require('express')
const app = express()
const port = 3000
app.get('/', (req, res) => {
request('https://google.ca', function(err, requestResponse, body) {
res.end(body)
})
})
//Testing HTTP Proxy in Node.js
var http = require('http'),
httpProxy = require('http-proxy');
var proxy = httpProxy.createProxyServer({});
var server = http.createServer(function(req, res) {
proxy.web(req, res, { target: 'http://1.1.1.1:80' });
});
var listeningPort = 5050;