Skip to content

Instantly share code, notes, and snippets.

@amd64bit
amd64bit / Linux_Nginx_MySQL_PHP5.sh
Created March 9, 2016 03:55 — forked from majimboo/Linux_Nginx_MySQL_PHP5.sh
CentOS 6.5 LEMP (Linux, Nginx, MySQL, PHP5) Stack Install Script with Composer and NodeJS
#!/bin/bash
# Install script for LEMP Web Server on CENTOS 6.5 by Majid Arif Siddiqui
# Init
echo "Initializing..."
sudo yum -y update
sudo yum -y groupinstall "Development Tools"
sudo yum -y install screen
@amd64bit
amd64bit / mosquitto.init.sh
Last active August 29, 2015 14:27 — forked from basuke/mosquitto.init.sh
Amazon Linux Init script for mosquitto MQTT 3.1 broker.
#!/bin/bash
#
# mosquitto This shell script takes care of starting and stopping
# mosquitto (MQTT 3.1 broker) on Amazon Linux.
#
# chkconfig: - 58 74
# description: mosquitto is a MQTT 3.1 broker. \
# http://mosquitto.org/
### BEGIN INIT INFO
@amd64bit
amd64bit / example.py
Last active August 29, 2015 14:27 — forked from taka-wang/example.py
install mosquitto 1.4 on raspberry pi
import paho.mqtt.client as mqtt
# The callback for when the client receives a CONNACK response from the server.
def on_connect(client, userdata, rc):
print("Connected with result code "+str(rc))
# Subscribing in on_connect() means that if we lose the connection and
# reconnect then subscriptions will be renewed.
client.subscribe("hello/world")
# The callback for when a PUBLISH message is received from the server.