Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

GeenLoop geenloop

🏠
Working from home
View GitHub Profile
@geenloop
geenloop / macFFmpeg.md
Created Sep 19, 2019 — forked from docPhil99/macFFmpeg.md
Mac webcam FFmpeg
View macFFmpeg.md

#Capture and stream a webcam To capture using the iSight camera on a Mac, or infact any other webcam connected to the Mac, we can use FFmpeg. First get a list of the devices installed.

ffmpeg -f avfoundation -list_devices true -i "" 

This will list the aviable video and audio devices.

The below will capture at 30fps and the set video size to a file. fmpeg -f avfoundation -framerate 30 -video_size 640x480 -i "0:none" out.avi

@geenloop
geenloop / java.sh
Last active Aug 13, 2019
MAC OS X | Mojave install JAVA 8 openjdk
View java.sh
brew tap adoptopenjdk/openjdk
brew cask install adoptopenjdk8
View jetidea
~/Library/Preferences/
~/Library/Caches/
~/Library/Application Support/
~/Library/Logs/
View bootable installer for macOS
Mojave:*
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume
High Sierra:*
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume
Sierra:
sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ macOS\ Sierra.app
El Capitan:
@geenloop
geenloop / apache_passwd.bash
Created Apr 28, 2019
Password Authentication with Apache
View apache_passwd.bash
apt-get update
apt-get install apache2-utils
htpasswd -c /etc/apache2/.htpasswd user
nano /etc/apache2/sites-enabled/000-default.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
@geenloop
geenloop / seedbox.bash
Created Apr 27, 2019
Linux Seedbox made from rTorrent & ruTorrent
View seedbox.bash
apt-get update
apt-get install -y rtorrent screen php php-geoip php7.0-cli php7.0-json php7.0-curl php7.0-cgi php7.0-mbstring libapache2-mod-php libapache2-mod-scgi apache2 unrar unzip ffmpeg mediainfo curl sqlite3 git
// get sourcecode of ruTorrent https://github.com/Novik/ruTorrent/releases
// adduser <name> for rtorrent service
// import settings https://gist.github.com/geenloop/bb4a8400271c29f8acff6037634c031d
chown -R rtorrent:www-data ruTorrent-3.9/ && chmod -R 770 ruTorrent-3.9/
mkdir /home/rtorrent/.rtorrent.session
@geenloop
geenloop / .rtorrent.rc
Last active Apr 27, 2019
Settings for rTorrent
View .rtorrent.rc
scgi_port = 127.0.0.1:5000
directory = /home/rtorrent/torrents
session = /home/rtorrent/.rtorrent.session
min_peers = 1
max_peers = 99
port_range = 50020-63025
port_random = yes
#dht = enable
dht_port = 6881
encryption = allow_incoming,try_outgoing,enable_retry
@geenloop
geenloop / perl_locale_fix.bash
Last active Apr 27, 2019
perl: warning: Setting locale failed.
View perl_locale_fix.bash
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales
View lets_encrypt.bash
add-apt-repository ppa:certbot/certbot
apt-get update
apt-get install python-certbot-apache
certbot --apache -d example.com -d www.example.com
certbot renew --dry-run
@geenloop
geenloop / apt_fix.bash
Created Apr 27, 2019
-bash: add-apt-repository: command not found
View apt_fix.bash
sudo apt-get install software-properties-common