Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
[Unit] | |
Description=Redis Datastore Server | |
After=network.target | |
[Service] | |
Type=forking | |
PIDFile=/var/run/redis/redis.pid | |
ExecStartPre=/bin/mkdir -p /var/run/redis | |
ExecStartPre=/bin/chown redis:redis /var/run/redis |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
respawn limit 10 5 | |
setuid ubuntu | |
chdir /opt/myAplicacion | |
env PORT=3000 |
description "Server Name | |
author "author" | |
start on (local-filesystems and net-device-up IFACE=eth0) | |
stop on shutdown | |
respawn | |
exec sudo -u ubuntu sh -c "NODE_ENV=production node /var/sites/stuff/app.js >> /var/log/stuff.log 2>&1" |
[Unit] | |
Description=Our cool Node.js App | |
After=network.target | |
[Service] | |
Type=forking | |
Restart=always | |
User=fooapp | |
ExecStart=/var/appdata/fooapp/node_modules/pm2/bin/pm2 start /var/appdata/fooapp/app.js | |
ExecStop=/var/appdata/fooapp/node_modules/pm2/bin/pm2 stop /var/appdata/fooapp/app.js |
#!/bin/bash | |
echo Provisioning Ruby on Rails... | |
echo ================================= | |
echo - Installing dependencies | |
sudo apt-get update -y -qq > /dev/null | |
sudo apt-get install curl -y -qq > /dev/null | |
echo - Installing mysql server | |
export DEBIAN_FRONTEND=noninteractive |
#!/usr/bin/env bash | |
sudo locale-gen en_US.UTF-8 | |
sudo update-locale LANG=en_US.UTF-8 | |
sudo update-locale LC_ALL=en_US.UTF-8 | |
sudo apt-get update | |
sudo apt-get install -y build-essential git curl libxslt1-dev libxml2-dev libssl-dev | |
# postgres |
#! /usr/bin/env bash | |
# Variables | |
APPENV=local | |
DBHOST=localhost | |
DBNAME=dbname | |
DBUSER=dbuser | |
DBPASSWD=test123 | |
echo -e "\n--- Mkay, installing now... ---\n" |