Skip to content

Instantly share code, notes, and snippets.

View jmathai's full-sized avatar

Jaisen Mathai jmathai

View GitHub Profile
@jmathai
jmathai / SmartTV.txt
Last active July 1, 2023 07:45
NextDNS Smart TV Denylist
# Title: Smart-TV Blocklist for Pi-hole
# Version: 15December2021v1
# Description: This is a blocklist to block smart-TVs sending metadata back home, sometimes with the added benefit of blocking interface ads for apps and movie services.
# Please help with collecting domains!
# It could occur that the TV fails to receive new updates, or that other apps or services no longer work. Please report such an incident.
# Make sure to also use the extra RegEx list at https://perflyst.github.io/PiHoleBlocklist/regex.list, which helps remove regional LG ad domains among other things.
# Panasonic Viera & panny tv
0077777700140002.myhomescreen.tv
cert-test.sandbox.google.com
@jmathai
jmathai / app.js
Created February 20, 2019 08:11 — forked from rfletcher/app.js
A simple bridge between iMessage and Home Assistant's conversation component
const HomeAssistant = require( 'homeassistant' );
const Pino = require( 'pino' );
const config = require( 'config' );
const hass = new HomeAssistant( config.get( 'home_assistant' ) );
const imessage = require( 'osa-imessage' );
const logger = Pino();
// TODO package this better
const bridge = {
@jmathai
jmathai / Elodie-On-Synology.md
Last active September 30, 2021 16:38
Getting Elodie running on a Synology
@jmathai
jmathai / joule-node-dynamic-dns.js
Created April 5, 2016 05:28
The source code for joule-node-dynamic-dns; a dynamic DNS Joule for AWS Lambda.
/**
* This Joule is a serverless dynamic DNS system using Lambda and Route53.
*/
// We have to require the aws-sdk and immediately set the credentials.
// If we instantiate the Route53 object first then it assumes the role assigned to the lambda function.
var AWS = require('aws-sdk');
if(process.env.AWS_KEY !== '' && process.env.AWS_SECRET !== '') {
AWS.config.update({accessKeyId: process.env.AWS_KEY, secretAccessKey: process.env.AWS_SECRET});
}
# username = your Joule username
# joule_name = the name of your Joule (probably joule-node-dynamic-dns)
# test.example.com. = the domain you'd like to use for DDNS (with a trailing .)
# a_secret_you_chose = the string you chose as your secret for your Joule
./client.sh username joule_name test.example.com. a_secret_you_chose
# Output if IP address hasn't changed
# {"status": "success", "message": "No change in IP address detected."}
#
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1458757563000",
"Effect": "Allow",
"Action": [
"route53:ChangeResourceRecordSets",
"route53:ListHostedZones"
],
git clone https://github.com/joulehq/joule-node-boilerplate.git
cd joule-node-boilerplate/src
cp events.json-sample events.json
npm i
npm test
> joule-boilerplate@0.0.1 test /Users/jaisenmathai/joule-node-boilerplate/src
> node ./node_modules/joule-node-local/index.js
{ headers: { Status: '200 OK', 'Content-Type': 'application/json' },
var Response = require('joule-node-response');
var JouleNodeDatabase = require('joule-node-database');
exports.handler = function(event, context) {
var response = new Response();
var database = new JouleNodeDatabase();
database.get('hasInvite')
.done(function(data) {
if(typeof(data.hasInvite) === 'undefined' || data.hasInvite !== true) {

Keybase proof

I hereby claim:

  • I am jmathai on github.
  • I am jaisenmathai (https://keybase.io/jaisenmathai) on keybase.
  • I have a public key whose fingerprint is E411 DF2B 1504 2E6F 97E9 3A35 0E43 CAEB 9251 6011

To claim this, I am signing this object:

var response = require('joule-node-response');
var client = require('twilio')();
exports.handler = function(event, context) {
client.messages.create({
body: event.body,
to: event.to,
from: process.env.from
}, function(err, message) {
if(message && message.sid) {