Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
apt-get install -y debconf-utils htop build-essential curl
# Install nginx server
apt-get install -y nginx
# Install and configure mysql server
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password admin'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password admin'
@clzola
clzola / install-redis.sh
Last active March 23, 2022 19:20
Bash script for installing Redis on Ubuntu 16.04
#!/bin/bash
# Install the Build and Test Dependencies
apt-get update
apt-get install -y curl build-essential tcl
# Download and Extract the Source Code
cd /tmp
curl -O http://download.redis.io/redis-stable.tar.gz
tar xzvf redis-stable.tar.gz
#!/bin/bash
USER="vagrant"
MYSQL_PASSWORD="admin"
# Update & Install Prerequisites
apt-get update
apt-get install -y debconf-utils
# Install nginx
[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target
[Service]
User=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf
[Install]
WantedBy=multi-user.target
@clzola
clzola / IntentUtilities.java
Created September 16, 2017 19:48
IntentUtilities fb, insta, email
public class IntentUtilities {
/**
* <p>Intent to open the official Facebook app. If the Facebook app is not installed then the
* default web browser will be used.</p>
*
* https://stackoverflow.com/questions/4810803/open-facebook-page-from-android-app
*
* <p>Example usage:</p>
*
* {@code newFacebookIntent(ctx.getPackageManager(), "https://www.facebook.com/JRummyApps");}