Skip to content

Instantly share code, notes, and snippets.

View itsmepetrov's full-sized avatar
🏠
Working from home

Anton Petrov itsmepetrov

🏠
Working from home
View GitHub Profile
@itsmepetrov
itsmepetrov / edge_disable_bing_button.md
Created March 17, 2023 15:16
Disabling the Bing/Discovery button on macOS

How to get rid of Bing/Discovery button in Edge on macOS

Execute the following commands in the terminal:

/usr/bin/defaults write /tmp/com.microsoft.Edge.plist HubsSidebarEnabled -bool false
sudo mkdir /Library/Managed\ Preferences
sudo mv /tmp/com.microsoft.Edge.plist /Library/Managed\ Preferences/
const HomeKitDevice = require('../HomeKitDevice')
class GledoptoLedController extends HomeKitDevice {
static get description() {
return {
model: [
'GLEDOPTO',
],
manufacturer: 'GLEDOPTO',
name: 'GLEDOPTO Led Controller',
@itsmepetrov
itsmepetrov / README.md
Last active March 10, 2019 16:44
Docker compose for Homebridge with ZigBee plugin platform (Raspberry PI)

Docker compose for Homebridge with ZigBee plugin platform (Raspberry PI)

Installation

After running the docker compose configuration add homebridge-zigbee plugin using the following command:

docker-compose exec homebridge npm i homebridge-zigbee
#EXTM3U
#EXTINF:0,Первый канал
#EXTGRP:другие
http://6557675f.ottclub.mobi/iptv/WXR5KQQTP3GSPP/127/index.m3u8
#EXTINF:0,Россия 1
#EXTGRP:другие
http://6557675f.ottclub.mobi/iptv/WXR5KQQTP3GSPP/504/index.m3u8
#EXTINF:0,НТВ
#EXTGRP:другие
http://6557675f.ottclub.mobi/iptv/WXR5KQQTP3GSPP/501/index.m3u8
const HomeKitDevice = require('../HomeKitDevice')
class AqaraTunableWhiteBulb extends HomeKitDevice {
static get description() {
return {
model: 'lumi.light.aqcn02',
manufacturer: 'LUMI',
name: 'Aqara Bulb',
}
}
const HomeKitDevice = require('../HomeKitDevice')
class IkeaTradfriDimmableBulb extends HomeKitDevice {
static get description() {
return {
model: [
'TRADFRI bulb E27 opal 1000lm',
'TRADFRI bulb E27 W opal 1000lm',
],
manufacturer: 'IKEA of Sweden',
const XIAOMI_STRUCT_ATTR = { id: 65281, type: 'charStr' }
const XIAOMI_STRUCT_OLD_ATTR = { id: 65282, type: 'charStr' }
const XIAOMI_MULTICLICK_ATTR = { id: 32768, type: 'boolean' }
const XIAOMI_PRESSURE_ATTR = { id: 16, type: 'int16' }
function parseXiaomiStruct(rawData) {
const buffer = new Buffer(rawData, 'ascii')
const data = {}
let index = 0
while (index < buffer.length) {
@itsmepetrov
itsmepetrov / gist:54836f3cc62501a3c797ee4aa8909b0b
Last active May 12, 2018 13:57 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@itsmepetrov
itsmepetrov / docker-compose.yaml
Last active May 9, 2018 12:41
Docker Compose VPN and Proxy
version: '3'
services:
vpn:
image: hwdsl2/ipsec-vpn-server
privileged: true
restart: always
volumes:
- /lib/modules:/lib/modules:ro
ports:
- 500:500/udp
// Based on http://en.wikipedia.org/wiki/Bank_card_number#Issuer_identification_number
// Card names used from tipsi-stripe.
const brandAmericanExpress = {
name: 'American Express',
prefixes: ['34', '37'],
}
const brandDiscover = {
name: 'Discover',
prefixes: ['60', '62', '64', '65'],
}