Skip to content

Instantly share code, notes, and snippets.

View kokoye2007's full-sized avatar

kokoye2007 kokoye2007

View GitHub Profile
#!/bin/sh
# Voice-over translator for SRT subtitles
# Copyright (C) 2012 Zoltan Kovacs <[email protected]>
# This is a GPL3+ free software.
# Version 0.1 (2012-02-28)
WORKDIR=/tmp/voiceover-work
if [ $# != 5 -a $# != 7 ]; then
echo "Voice-over translator for SRT subtitles"
@kokoye2007
kokoye2007 / pitftupdater.sh
Created April 9, 2016 17:58 — forked from ladyada/pitftupdater.sh
PiTFT updater scripty
#!/bin/bash
# PiTFT Resistive 2.8" (PID 1601) or Capacitive 2.8" (PID 1983) setup script or Resistive 3.5" (PID 2097) or 2.2" No-Touchscreen setup script!
set -e
function cleanup() {
if [ "${mountpoint}" != "/" ]
then
sudo -n umount "${mountpoint}/boot" 2> /dev/null
@kokoye2007
kokoye2007 / livestreamingyoutube
Created May 12, 2016 07:57 — forked from laurenarcher/livestreamingyoutube
Livestreaming to Youtube Live, Ubuntu, Linux FFMPEG
Terminal Commands:
One webcam:
ffmpeg -f alsa -ac 2 -i hw:1,0 -f v4l2 -s 1280x720 -r 10 -i /dev/video1 -vcodec libx264 -pix_fmt yuv420p -preset ultrafast -r 25 -g 20 -b:v 2500k -codec:a libmp3lame -ar 44100 -threads 6 -b:a 11025 -bufsize 512k -f flv rtmp://a.rtmp.youtube.com/live2/YOURSTREAMNAMEHERE
Two webcam overlay:
ffmpeg -f alsa -ac 2 -i hw:1,0 -f v4l2 -s 1280x720 -r 10 -i /dev/video1 -f v4l2 -s 320x240 -r 10 -i /dev/video0 -filter_complex "[1:v]setpts=PTS-STARTPTS[bg]; [2:v]setpts=PTS-STARTPTS[fg]; [bg][fg]overlay=shortest=1 [out]" -map "[out]" -map 0:a -vcodec libx264 -pix_fmt yuv420p -preset veryfast -r 25 -g 20 -b:v 2500k -codec:a libmp3lame -ar 44100 -threads 6 -b:a 11025 -bufsize 512k -f flv rtmp://a.rtmp.youtube.com/live2/YOURSTREAMNAMEHERE

DEFAULT

sudo apt-get update

JRE (Java Runtime Environment)

sudo apt-get install default-jre

JDK (Java Development Kit)

#!/bin/bash
# http://www.itforeveryone.co.uk/image-to-video.html
mkdir small
cp *.jpg small/.
# change image resolution - resize 200x200
mogrify -resize 200x200 small/*.jpg
# Create the morph images
convert small/*.jpg -delay 10 -morph 5 small/%05d.jpg
# Stitch them together into a video
#!/bin/bash
source ~/.digitalocean_password
MAX_ARGS=3
BAD_ARG=65
SQL=`which mysql`
CMD1="CREATE DATABASE IF NOT EXISTS $1;"
CMD2="GRANT USAGE ON *.* TO $2@localhost IDENTIFIED BY '$3';"
CMD3="GRANT ALL PRIVILEGES ON $1.* TO $2@localhost;"
CMD4="FLUSH PRIVILEGES;"
@kokoye2007
kokoye2007 / qr-zenity.sh
Created September 23, 2017 10:54
QR Code Create test bash zenity and qrencode
#!/bin/bash
me=`whoami`
outpath=`zenity --entry --title="Save path?" --text="What folder would you like to save the QR image to? Default of /home/$me/Pictures will be used if one is not entered."`
button0=$?
if [ $button0 -eq 0 ];then
if [ -z $outpath ];then
outpath=/home/`whoami`/Pictures
fi
pname=`zenity --entry --title="What filename?" --text="What name should be used for the output? ex: filename > filename.png"`
@kokoye2007
kokoye2007 / android-l10n.md
Created February 19, 2018 17:46
Android Localization Tools
@kokoye2007
kokoye2007 / rainymood.sh
Last active June 25, 2018 13:02
RainyMood App - Terminal
#!/bin/bash
#
# sudo wget -O /usr/local/bin/rainymood https://gist.githubusercontent.com/kokoye2007/2575aebeefd469372d450e558a58bf91/raw/d908acf0ea70503d4faffb0d297fa10f6e544bc1/rainymood.sh
# sudo chmod +x /usr/local/bin/rainymood
# rainymood
#
# Download script edit by [email protected]
# FOSSMyanmar Ubuntu-MM
# you can change download dir .rainymood
# you can change mpv to vlc or else
@kokoye2007
kokoye2007 / install-php7.2-mcrypt.sh
Last active April 28, 2018 06:14 — forked from arzzen/install-php7.2-mcrypt.sh
Install PHP 7.2 MCrypt extension
#
# Check version php and pecl
#
php -v # if default php is not 7.2 then use /usr/bin/php7.2 instead php
pecl version
sudo apt install php-pear
sudo apt install php7.2-dev
#