Skip to content

Instantly share code, notes, and snippets.

View udibagas's full-sized avatar

udibagas udibagas

View GitHub Profile
@udibagas
udibagas / moodle-nginx-config
Created July 9, 2018 09:53 — forked from jeffersonmartin/moodle-nginx-config
Nginx Config for Moodle (with proper rewrite/paths)
server {
listen 80;
server_name learn.mydomain.com;
return 301 https://learn.mydomain.com$request_uri;
}
server {
listen 443 ssl;
server_name learn.mydomain.com;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style media="all">
body {
width: 7cm;
margin: 0 auto;
}
@udibagas
udibagas / Dockerfile
Last active April 2, 2018 03:06 — forked from neonxp/Dockerfile
Docker for PHP 5.3 project
FROM ubuntu:12.04
MAINTAINER Alexander Kiryukhin <[email protected]>
RUN apt-get update
RUN apt-get -y upgrade
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install apache2 libapache2-mod-php5 php5-mysql php5-sybase php5-gd php-pear php-apc php5-curl curl lynx-cur php5-xdebug php5-memcached memcached wget
RUN a2enmod php5
<?php
include "../koneksi.php";
@session_start();
$username = mysqli_real_escape_string($konek, $_POST['username']);
$password = mysqli_real_escape_string($konek, $_POST['password']);
$password = md5($password);
<?php
@session_start();
if(isset($_SESSION['username'])==true)
{
echo "<meta http-equiv='refresh' content='0;URL=media.php?page=ikhtisar' />";
}
?>
// WARNING !!!
// HIGH -> default relay 2 channel
// OUTPUT
const int PIN_COMPRESSOR = 2;
const int PIN_FAN = 4;
const int PIN_LAMPU = 7;
const int PIN_HEATER = 8;
const int PIN_FIRE_ON = 12;
const int PIN_FIRE_OFF = 13;
/**
* Program untuk jarak
*/
#include <Streaming.h>
#include <Ethernet.h>
#include <SPI.h>
#include <MemoryFree.h>
#include <Agentuino.h>
#include <Flash.h>
#include <elapsedMillis.h>
elapsedMillis timer0;
#define interval 300000
// WARNING !!!
// HIGH -> default relay 2 channel
// OUTPUT
const int PIN_COMPRESSOR = 2;
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", KERNELS=="1-1.2", SYMLINK+="serial1"
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", KERNELS=="1-1.3", SYMLINK+="serial2"
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", KERNELS=="1-1.4", SYMLINK+="serial3"
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", KERNELS=="1-1.5", SYMLINK+="serial4"
/**
* Program untuk membaca arus, gas, suhu, kelembaban, jarak
*/
#include <Streaming.h>
#include <Ethernet.h>
#include <SPI.h>
#include <MemoryFree.h>
#include <Agentuino.h>
#include <Flash.h>