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 / install_ffmpeg_ubuntu.sh
Created June 12, 2016 18:13 — forked from xdamman/install_ffmpeg_ubuntu.sh
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@moeiscool
moeiscool / install-pptp-client-shinobi-video.sh
Created January 25, 2019 05:26
Install Shinobi Video PPTP VPN Client on Ubuntu 18.04
sudo apt install ppp pptp-linux
echo "/etc/ppp/chap-secrets"
DOMAIN="vpn.shinobi.video"
echo "VPN Server User"
read vpnuser
echo "VPN Server Password"
read vpnpass
chapsecret="$DOMAIN\\$vpnuser PPTP $vpnpass *"
if grep -q $chapsecret /etc/ppp/chap-secrets; then
echo "Already Set."
@moeiscool
moeiscool / fixDockerVersion.sh
Created July 18, 2019 03:36
Fix Docker version on Ubuntu so you can install nvidia-docker2
# Solution found here https://github.com/NVIDIA/nvidia-docker/issues/857#issuecomment-482379024
DOCKER_CE_VERSION=`apt-cache show nvidia-docker2 | grep -Po "(?<=docker-ce \(= )([^)]*)" | head -n 1`
apt-get -yq install nvidia-docker2 docker-ce=${DOCKER_CE_VERSION}
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:flutter_vlc_player/vlc_player.dart';
import 'package:flutter_vlc_player/vlc_player_controller.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
@moeiscool
moeiscool / build-tensorflow.sh
Created June 2, 2020 04:13 — forked from muendelezaji/build-tensorflow.sh
Script to build TensorFlow from source. Platform is ARM64 (aka aarch64) with OpenCL support via Codeplay SYCL SDK
#!/bin/bash
# =============================================================
# UPDATE SOURCE
# =============================================================
# git clone https://github.com/tensorflow/tensorflow
# git checkout -- .
# git pull origin master
# TF_BRANCH=r1.8
TF_ROOT=/home/tensorflow
@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 / 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 / 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 / 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 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.