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 yum update -y | |
| sudo yum install httpd -y | |
| sudo systemctl enable httpd | |
| sudo systemctl start httpd | |
| TOKEN=`curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"` | |
| INSTANCE_IP=$(curl -H "X-aws-ec2-metadata-token: $TOKEN" -s http://169.254.169.254/latest/meta-data/public-ipv4) | |
| echo "Hello from instance with IP: $INSTANCE_IP, Running httpd" | sudo tee /var/www/html/index.html | |
| # Hello from instance with IP: 54.218.123.250, Running httpd |
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
| #!/usr/bin/env python | |
| '''Crop an image to just the portions containing text. | |
| Usage: | |
| ./crop_morphology.py path/to/image.jpg | |
| This will place the cropped image in path/to/image.crop.png. | |
| For details on the methodology, see |
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
| <?php | |
| /* | |
| Plugin Name: Maintain Blogger Permalinks | |
| Version: 2.1 | |
| Plugin URI: http://justinsomnia.org/2006/10/maintain-permalinks-moving-from-blogger-to-wordpress/ | |
| Description: Update your newly imported Blogger posts with their old Blogger generated URL "slugs". This is a utility plugin that only needs to be run once. After that you can deactivate and delete it. Goto <a href="tools.php?page=maintain-blogger-permalinks.php">Tools > Maintain Blogger Permalinks</a> to run. | |
| Author: Justin Watt | |
| Author URI: http://justinsomnia.org/ | |
| 2.1 |
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 | |
| # GUI-related packages | |
| pkgs=" | |
| xserver-xorg-video-fbdev | |
| xserver-xorg xinit | |
| gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base | |
| gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa | |
| gstreamer1.0-libav | |
| epiphany-browser |
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 | |
| # REF: https://github.com/meetecho/janus-gateway/blob/master/README.md | |
| # REF: https://groups.google.com/forum/#!msg/meetecho-janus/RYP4FBaeUi0/bIGSPZlpEQAJ | |
| # Tested enviroment: ubuntu {14.04,16.04} LTS | |
| # Tested Janus version: 0.2.0 | |
| # 0. Get infos and params without empty | |
| # ====== | |
| set -e |
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 | |
| # | |
| # Arezqui Belaid <[email protected]> | |
| # | |
| FS_CONFIG_PATH=/etc/freeswitch | |
| FS_BASE_PATH=/usr/src | |
| FS_VERSION=v1.7 | |
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
| # source: https://trac.ffmpeg.org/wiki/CentosCompilationGuide | |
| yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel | |
| mkdir ~/ffmpeg_sources | |
| cd ~/ffmpeg_sources | |
| curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz | |
| tar xzvf yasm-1.2.0.tar.gz | |
| cd yasm-1.2.0 |
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
| #add the repositories | |
| sudo apt-get update && sudo apt-get install -y curl | |
| curl http://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | sudo apt-key add - | |
| echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" | sudo tee /etc/apt/sources.list.d/freeswitch.list | |
| sudo apt-get update | |
| # install dependencies | |
| sudo apt-get install -y libyuv-dev libvpx2-dev liblua5.2-dev libvpx2-dev libvpx2 zlib1g-dev libspeex1 libopus-dev libsndfile-dev autoconf automake devscripts gawk g++ git-core 'libjpeg-dev|libjpeg62-turbo-dev' libncurses5-dev 'libtool-bin|libtool' make python-dev gawk pkg-config libtiff5-dev libperl-dev libgdbm-dev libdb-dev gettext libssl-dev libcurl4-openssl-dev libpcre3-dev libspeex-dev libspeexdsp-dev libsqlite3-dev libedit-dev libldns-dev libpq-dev |
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 | |
| # description: Tomcat Start Stop Restart | |
| # | |
| processname: tomcat | |
| # chkconfig: 234 20 80 | |
| JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.45-28.b13.el6_6.x86_64/jre/ | |
| export JAVA_HOME | |
| PATH=$JAVA_HOME/bin:$PATH | |
| export PATH |
NewerOlder