Skip to content

Instantly share code, notes, and snippets.

View Katheesh's full-sized avatar
❤️
Efficiency consists in a resolute mind

𝗞𝗔𝗧𝗛𝗘𝗘𝗦𝗞𝗨𝗠𝗔𝗥 Katheesh

❤️
Efficiency consists in a resolute mind
  • Embedded Systems & Software Engineer at BinSofts Holdings
  • Sri Lanka ⇨ Batticaloa.
  • 15:06 (UTC +05:30)
View GitHub Profile
@Katheesh
Katheesh / config.json
Created October 20, 2024 07:34
Dasklug config.json
{"pins":{"gpi":[],"gpo":[]},"sensors":[{"name":"pir_sensor","displayname":"PIR Sensor","type":"pirsensor","io":"lh,pcfin,0,0","status":"nc","actions":{"on":[],"off":[]},"misc":{}}],"relays":[{"name":"covelight","type":"switch","io":"lh,pcf,0,0","displayname":"covelight","misc":{}},{"name":"ceiling_light","type":"switch","io":"lh,pcf,0,1","displayname":"ceiling light","misc":{}},{"name":"bathroom_light","type":"switch","io":"lh,pcf,0,2","displayname":"bathroom light","misc":{}},{"name":"dine_light","type":"switch","io":"lh,pcf,0,3","displayname":"dine light","misc":{}},{"name":"door_bell","type":"doorbell","io":"lh,mbo,19,40010","displayname":"Door bell","misc":{}},{"name":"dnd_light","type":"dndlight","io":"lh,mbo,17,40011","displayname":"DND light","misc":{}},{"name":"mur_light","type":"murlight","io":"lh,mbo,17,40012","displayname":"MUR light","misc":{}},{"name":"room_no_light","type":"roomnolight","io":"lh,mbo,17,40014","displayname":"Room No light","misc":{}},{"name":"fcu1","type":"thermostat","io":"lh,pc
@Katheesh
Katheesh / Angular Swipe.js
Created January 27, 2023 06:15
Mesure swipe action using angular type script
import { Component, HostListener, Input, OnInit } from '@angular/core';
export class AppbarComponent implements OnInit {
touchstartX:number = 0;
touchstartY:number = 0;
touchendX:number = 0;
touchendY:number = 0;
@HostListener('touchstart', ['$event']) gesuredZonestart(event:any) {
@Katheesh
Katheesh / app.js
Created October 10, 2022 15:35 — forked from prof3ssorSt3v3/app.js
PWA 6 - Handling Install Events
const APP = {
deferredInstall: null,
init() {
if ('serviceWorker' in navigator) {
//register our service worker
navigator.serviceWorker
.register('/sw.js', {
updateViaCache: 'none',
scope: '/',
})
function $(newNumber) {
this.permementNumber = newNumber;
console.log(this.permementNumber);
}
$.prototype.add = function(addThisNumber) {
this.permementNumber = this.permementNumber + addThisNumber;
return new $(this.permementNumber);
}
@Katheesh
Katheesh / Remove.sh
Created March 27, 2021 13:47
Remove Files Contain folder
sudo rm -rf DirectoryName
sudo apt-get install ubuntu-budgie-desktop