Skip to content

Instantly share code, notes, and snippets.

View dieu's full-sized avatar

Anton Panasenko dieu

View GitHub Profile
@dieu
dieu / Dockerfile
Last active May 26, 2024 21:35
Home Assistant Docker on Mac OS
FROM homeassistant/home-assistant:stable
# Install avahi-daemon in container
# https://gnanesh.me/avahi-docker-non-root.html
RUN set -ex \
&& apk --no-cache --no-progress add avahi avahi-tools dbus \
# Disable default Avahi services
&& rm /etc/avahi/services/* \
&& rm -rf /var/cache/apk/*
@dieu
dieu / sleephq.py
Last active March 13, 2024 19:39
SleepHQ Uploader
import binascii
from lxml.html import parse as parse_url
from parse import parse
import requests
from tqdm import tqdm
from os import path
import os
import time
class ezshare():
@dieu
dieu / test.py
Last active October 24, 2019 00:40
def gen_orderdate(min_date, max_date): # use random to pick up speecific date
pass
def gen_shippingdate(orderdate): # use randome value from [1, 2] to get ahead of orderdate
pass
def gen_orderstatus(): # use random value from [1, 2, 3, 4]
pass
def gen_firstname(): # use randome value to pick up from array of first names
@dieu
dieu / MongoConnect.java
Created February 11, 2012 23:49
Path for mongo-java-driver 2.5.3
package com.mongodb;
import com.mongodb.DBTCPConnector;
import com.mongodb.Mongo;
import com.mongodb.MongoURI;
import com.mongodb.ServerAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;
./configure --with-zeromq=/opt/zeromq-2.0.8-test
checking for a BSD-compatible install... /opt/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /opt/local/bin/gmkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for a sed that does not truncate output... /opt/local/bin/gsed
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
./configure --prefix=/opt/zeromq-2.0.8-test
checking for a BSD-compatible install... /opt/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /opt/local/bin/gmkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes