View dht-magellan.ino
#include <DHT.h>;
#include "Magellan.h"
#define DHTTYPE DHT22
#define DHTPIN 7
Magellan magel;
//Token Key you can get from magellan platform
char auth[]="your-token-id";
View ais-nbiot-example.ino
#include "AIS_NB_BC95.h"
String apnName = "devkit.nb";
String serverIP = ""; // Your Server IP
String serverPort = ""; // Your Server Port
String udpData = "HelloWorld";
AIS_NB_BC95 AISnb;
View assistant-autolaunch-config.sh
#!/bin/bash
sudo touch /lib/systemd/system/launch-assistant.service
echo -e "[Unit]
Description=Google Assistant Demo App
Wants=network-online.target
After=network-online.target
[Service]
View nearby.sql
SELECT *,( 3959 * acos( cos( radians(13.785872) ) * cos( radians( field_location_lat ) ) * cos( radians( field_location_lng ) - radians(100.570635) ) + sin( radians(13.785872) ) * sin( radians( field_location_lat ) ) ) ) AS distance
FROM (
SELECT users_field_data.uid,users_field_data.name, user__field_contact_line.field_contact_line_value,user__field_gender.field_gender_target_id,user__field_location.field_location_lat,user__field_location.field_location_lng
FROM users_field_data,user__field_contact_line,user__field_location,user__field_gender
WHERE users_field_data.status=1
AND users_field_data.uid=user__field_contact_line.entity_id
AND users_field_data.uid=user__field_location.entity_id
AND users_field_data.uid=user__field_gender.entity_id
AND user__field_gender.field_gender_target_id=2
) AS a
View index.php
<?php
require_once '../vendor/autoload.php';
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\FirePHPHandler;
$logger = new Logger('LineBot');
$logger->pushHandler(new StreamHandler('php://stderr', Logger::DEBUG));
View index.php
<?php
$columns = array();
$img_url = "https://cdn.shopify.com/s/files/1/0379/7669/products/sampleset2_1024x1024.JPG?v=1458740363";
for($i=0;$i<5;$i++) {
$actions = array(
new \LINE\LINEBot\TemplateActionBuilder\PostbackTemplateActionBuilder("Add to Cart","action=carousel&button=".$i),
new \LINE\LINEBot\TemplateActionBuilder\UriTemplateActionBuilder("View","http://www.google.com")
);
$column = new \LINE\LINEBot\MessageBuilder\TemplateBuilder\CarouselColumnTemplateBuilder("Title", "description", $img_url , $actions);
View index.php
<?php
$actions = array (
// general message action
New \LINE\LINEBot\TemplateActionBuilder\MessageTemplateActionBuilder("button 1", "text 1"),
// URL type action
New \LINE\LINEBot\TemplateActionBuilder\UriTemplateActionBuilder("Google", "http://www.google.com"),
// The following two are interactive actions
New \LINE\LINEBot\TemplateActionBuilder\PostbackTemplateActionBuilder("next page", "page=3"),
New \LINE\LINEBot\TemplateActionBuilder\PostbackTemplateActionBuilder("Previous page", "page=1")
View index.php
<?php
$actions = array (
New \LINE\LINEBot\TemplateActionBuilder\PostbackTemplateActionBuilder("yes", "ans=y"),
New \LINE\LINEBot\TemplateActionBuilder\PostbackTemplateActionBuilder("no", "ans=N")
);
$button = new \LINE\LINEBot\MessageBuilder\TemplateBuilder\ConfirmTemplateBuilder("confim message", $actions);
$outputText = new \LINE\LINEBot\MessageBuilder\TemplateMessageBuilder("confim message", $button);
$response = $bot->replyMessage($event->getReplyToken(), $outputText);
View index.php
<?php
$outputText = new \LINE\LINEBot\MessageBuilder\LocationMessageBuilder("Eiffel Tower", "Champ de Mars, 5 Avenue Anatole France, 75007 Paris, France", 48.858328, 2.294750);
$response = $bot->replyMessage($event->getReplyToken(), $outputText);
View index.php
<?php
$img_url = "https://cdn.shopify.com/s/files/1/0379/7669/products/sampleset2_1024x1024.JPG?v=1458740363";
$outputText = new LINE\LINEBot\MessageBuilder\ImageMessageBuilder($img_url, $img_url);
$response = $bot->replyMessage($event->getReplyToken(), $outputText);