This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| for i in *.mp4; do | |
| ffmpeg -i "${i}" -r 0.033 -vf scale=-1:240 -vcodec png capture-%002d.png | |
| montage -title "Movie Name\nSubtitle" -geometry +4+4 capture*.png "$i".png | |
| rm capture*.png | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [[local|localrc]] | |
| # Credentials | |
| DATABASE_PASSWORD=devstack | |
| ADMIN_PASSWORD=devstack | |
| SERVICE_PASSWORD=devstack | |
| SERVICE_TOKEN=devstack | |
| RABBIT_PASSWORD=devstack | |
| # Services |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| exten => s,1,Answer | |
| same=> n,NoOp("Caller ID IS: ${CALLERID(name)}") | |
| same => n,MYSQL(Connect connid 127.0.0.1 root root asteriskdb) | |
| same => n,MYSQL(Query resultid ${connid} SELECT name,ban FROM directory WHERE number='${CALLERID(name)}') | |
| same => n,MYSQL(Fetch fetchid ${resultid} name ban) | |
| same => n,NoOp("We found: ${name} ${ban}") | |
| same => n,MYSQL(Clear ${resultid}) | |
| same => n,MYSQL(Disconnect ${connid}); | |
| same => n,Set(CALLERID(name)=${name}) | |
| same => n,NoOp() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mkdir bottle | |
| cd bottle | |
| pip install virtualenv==12.0.7 | |
| virtualenv venv | |
| source venv/bin/activate | |
| pip install bottle==0.12.8 | |
| pip freeze > requirements.txt | |
| git init | |
| git add . | |
| git commit -m "initial commit" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| DATE=`date +%Y-%m-%d_%Hh%Mm` | |
| ffmpeg -f alsa -i pulse -f x11grab -acodec pcm_s16le -r 24 -s 1920*1080 -i :0.0+1366,0 -vcodec libx264 -preset ultrafast -threads 4 -y /home/max/video/out`date +%Y-%m-%d_%Hh%Mm`.mkv | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # GTK+ and Firefox for Amazon Linux | |
| # Written by Joseph Lawson 2012-06-03 | |
| # http://joekiller.com | |
| # http://joekiller.com/2012/06/03/install-firefox-on-amazon-linux-x86_64-compiling-gtk/ | |
| # chmod 755 ./gtk-firefox.sh | |
| # sudo ./gtk-firefox.sh | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Build environment. I use vagrant ubuntu/trusty64 | |
| sudo apt-get install build-essential git-core | |
| sudo git clone https://github.com/raspberrypi/tools.git /opt/tools | |
| export CCPREFIX="/opt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-" | |
| # Get ffmpeg and x264 repos | |
| git clone git://source.ffmpeg.org/ffmpeg.git | |
| cd ffmpeg | |
| git clone git://git.videolan.org/x264 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ####################################### | |
| Mangle, Queue Tree and prioritization | |
| ####################################### | |
| As we know ‘simple queue’ marks packets from/to target ip and queues them using | |
| global-in/global-out parents for packets at the local side of router. If we want | |
| to queue services using ‘queue tree’ we can do it at the local or public side. | |
| However if we want to use ‘simple queue’ and ‘queue tree’ for services we don’t | |
| have that choice. Packets are marked at the local side and queued by ‘simple queue’ | |
| (we can’t see it in /ip firewall mange and /queue tree). The second marking and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### | |
| ### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget. | |
| ### You can download all the binaries one-shot by just giving the BASE_URL. | |
| ### Script might be useful if you need Oracle JDK on Amazon EC2 env. | |
| ### Script is updated for every JDK release. | |
| ### Features:- | |
| # 1. Resumes a broken / interrupted [previous] download, if any. | |
| # 2. Renames the file to a proper name with including platform info. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo docker run --rm --publish 80:80 --publish 443:443 --name letsencrypt \ | |
| --volume "/tmp/letsencrypt/etc/:/etc/letsencrypt" \ | |
| --volume "/tmp/letsencrypt/var/:/var/lib/letsencrypt" \ | |
| quay.io/letsencrypt/letsencrypt:latest certonly --standalone \ | |
| -d domain.name -d www.domain.name --agree-tos --email [email protected] | |