Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block nikotan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nikotan /
Last active Jan 4, 2019
Python script for AWS lambda to forward AWS IoT 1-Click event to IFTTT
import json
import os
import urllib.request
import logging
logger = logging.getLogger(__name__)
def lambda_handler(event, context):
nikotan /
Last active May 26, 2018
Python script for server side of IoT BOT to monitor BLE tags (for AWS lambda)
# -*- coding: utf-8 -*-
from datetime import datetime, timedelta, timezone
import boto3
from boto3.session import Session
from boto3.dynamodb.conditions import Key
def lambda_handler(event, context):
nikotan / BLETagMonitor_esp32.ino
Last active Jan 1, 2019
IoT BOT to monitor BLE tags using ESP32
View BLETagMonitor_esp32.ino
#include <codecvt>
#include <string>
#include <cassert>
#include <locale>
#include <esp_system.h>
#include <rom/rtc.h>
#include <EEPROM.h>
#include <WiFi.h>
nikotan / esp8266_PostMonitor.ino
Created Apr 30, 2018
IoT BOT to monitor mailbox using ESP8266 and tilt switch
View esp8266_PostMonitor.ino
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
#define DEBUG
#define PIN_LED 4
#define SSID "{your_ssid}"
#define PASSWORD "{your_password}"
#define IFTTT_HOST ""
#define IFTTT_PATH "/trigger/{your_event}/with/key/{your_key}"
nikotan / nikobot.lua
Last active Apr 9, 2016
LINE BOT API sample code on (with Microsoft Translator Text API)
View nikobot.lua
-- setting
local mstr_cid = 'client_id for microsoft translator text api'
local mstr_secret = 'client_secret for microsoft translator text api'
local line_id = 'Channel ID for LINE BOT API'
local line_secret = 'Channel Secret for LINE BOT API'
local line_mid = 'MID for LINE BOT API'
-- function: mstr
function mstr(text, cid, secret)
local lom = require 'lxp.lom'
nikotan / main.cpp
Created Aug 16, 2011
face detection sample code for OpenCV
View main.cpp
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <opencv/ml.h>
void doMosaic(IplImage* in, int x, int y,
int width, int height, int size);
int main (int argc, char **argv)
int i, c;
#!/usr/bin/env perl
use strict;
use warnings;
use File::HomeDir;
use Path::Class qw(dir);
use DBI;
my $home = File::HomeDir->my_home;
You can’t perform that action at this time.