Skip to content

Instantly share code, notes, and snippets.

@xieren58
xieren58 / Tailwindcssunreset.scss
Created March 9, 2023 07:31 — forked from swyxio/Tailwindcssunreset.scss
Tailwind CSS Un-Reset - un-reset Tailwind's Preflight CSS Reset so that autogenerated HTML looks consistent with the rest of your Tailwind site. - https://www.swyx.io/writing/tailwind-unreset
.unreset {
a {
@apply text-blue-700 underline;
}
p {
@apply my-4;
}
blockquote,
figure {
import multiprocessing as mp
import websockets
import asyncio
import json
import sys
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
async def upbit_ws_client(q):
@xieren58
xieren58 / pyside2_qrunnable_signal_test.py
Created April 14, 2022 08:10 — forked from dalejfer/pyside2_qrunnable_signal_test.py
Run a QTheadPool with signal emitting QRunnable workers. Capture the signals in the main thread and update the UI.
#!python3.7
import random
import time
import PySide2
from PySide2 import QtCore, QtWidgets
from PySide2.QtCore import Slot, Signal, QObject, QThreadPool, QRunnable
class MyEmitter(QObject):
@xieren58
xieren58 / websocket-pybithumb-with-pyqt.py
Created April 11, 2022 02:38 — forked from mr-yoo/websocket-pybithumb-with-pyqt.py
pybithumb websocket test with PyQt
from pybithumb import WebSocketManager
import sys
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import QIcon
import time
class Worker(QThread):
recv = pyqtSignal(str)
import sys
import os
from PySide2.QtCore import Qt, QObject, Signal, Slot, Property
from PySide2.QtWidgets import QApplication, QSystemTrayIcon, QStyle, QAction, QMenu, QMessageBox
from PySide2.QtQml import QQmlApplicationEngine
my_list = ['here','is','my','list']
class Manager(QObject):
@xieren58
xieren58 / ButtonPanel.qml
Created April 10, 2022 13:18 — forked from Razzo78/ButtonPanel.qml
QML - A panel of buttons that fill a row and maintains the button width setting
import QtQuick 2.7
import QtQuick.Controls 2.1
import QtQuick.Layouts 1.1
Item {
width: 640
height: 480
RowLayout {
id: rowLayout
@xieren58
xieren58 / threading_example.py
Created April 2, 2022 04:38 — forked from el3/threading_example.py
threading in kivy example
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout
from kivy.properties import StringProperty
from kivy.clock import mainthread
import threading
import time
@xieren58
xieren58 / system_uuid.sh
Created April 1, 2022 10:19 — forked from bencord0/system_uuid.sh
Unique id for a linux system
#!/bin/bash
cat /var/lib/dbus/machine-id && exit
# Provided by dbus, hence available on all systemd systems.
# Any user can read it and it is persistent accross boots.
# It is unique per installation, and works well in VMs.
# Not all systems (i.e. stage3 gentoo/handbook install)
# have dbus installed by default.
cat /sys/class/dmi/id/product_uuid && exit
@xieren58
xieren58 / get_serial_number.py
Created April 1, 2022 09:38 — forked from angeloped/get_serial_number.py
Python code to get motherboard serial number. For Linux, MacOS, and Windows.
# wmic bios get serialnumber#Windows
# hal-get-property --udi /org/freedesktop/Hal/devices/computer --key system.hardware.uuid#Linux
# ioreg -l | grep IOPlatformSerialNumber#Mac OS X
import os, sys
def getMachine_addr():
os_type = sys.platform.lower()
if "win" in os_type:
command = "wmic bios get serialnumber"
elif "linux" in os_type:
command = "hal-get-property --udi /org/freedesktop/Hal/devices/computer --key system.hardware.uuid"
@xieren58
xieren58 / README.md
Created April 1, 2022 04:21 — forked from plugnburn/README.md
JJY.js: Web Audio API based JJY transmitter

JJY.js: JJY time signal emulation/transmission library

Usage

  1. Make sure that the watch/clock is configured to receive JJY 40 KHz signal (for most Casio Waveceptor/G-Shock watches, the easiest way is to enter the engineer menu by pressing Mode+Light+Receive and select J 40 reception mode, for all other watches you need to set the home city to Tokyo)
  2. Make sure your device clock is in sync before running the emulator.
  3. From the page, run: