Skip to content

Instantly share code, notes, and snippets.

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

Takuya Matsuyama craftzdog

🏠
Working from home
View GitHub Profile
@craftzdog
craftzdog / tokens.css
Created September 2, 2024 06:36
Color palette tokens
@layer tokens {
:where(:root, :host) {
--font-weights-thin: 100;
--font-weights-extralight: 200;
--font-weights-light: 300;
--font-weights-normal: 400;
--font-weights-medium: 500;
--font-weights-semibold: 600;
--font-weights-bold: 700;
--font-weights-extrabold: 800;
@craftzdog
craftzdog / editor.lua
Created October 3, 2023 07:24
How to highlight HSL colors with `mini.hipatterns`
-- plugins/editor.lua
return {
{
"echasnovski/mini.hipatterns",
event = "BufReadPre",
opts = {
highlighters = {
hsl_color = {
pattern = "hsl%(%d+,? %d+,? %d+%)",
group = function(_, match)
$ dpkg -l | grep gnome
ii gir1.2-gnomebluetooth-1.0:amd64 3.28.0-2 amd64 Introspection data for GnomeBluetooth
ii gir1.2-gnomedesktop-3.0:amd64 3.28.2-0ubuntu1 amd64 Introspection data for GnomeDesktop
ii gkbd-capplet 3.26.0-3 amd64 GNOME control center tools for libgnomekbd
ii gnome-accessibility-themes 3.28-1ubuntu1 all High Contrast GTK+ 2 theme and icons
ii gnome-bluetooth 3.28.0-2 amd64 GNOME Bluetooth tools
ii gnome-calendar 3.28.2-0ubuntu0.18.04.1 amd64 Calendar application for GNOME
ii gnome-control-center 1:3.28.2-0ubuntu0.18.04.1 amd64 utilities to configure the GNOME desktop
ii gnome-control-center-data 1:3.28.2-0ubuntu0.18.04.1
// Initialize Firebase
var config = {
apiKey: '****',
authDomain: '***.firebaseapp.com',
databaseURL: 'https://***.firebaseio.com',
projectId: '***',
storageBucket: '***.appspot.com',
messagingSenderId: '***'
}
firebase.initializeApp(config)
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>Craftzdog&apos;s Room Conditions</title>
<script src="lib/highcharts.js"></script>
<script src="lib/dark-unica.js"></script>
<script src="lib/moment.min.js"></script>
package main
import (
"./sensors"
"log"
"time"
"context"
firebase "firebase.google.com/go"
"google.golang.org/api/option"
)
package sensors
// Temperature and Pressure sensor
import (
"log"
"os/exec"
"strings"
"strconv"
)
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===============================================-===========================================-============-===============================================================================
ii accountsservice 0.6.45-1ubuntu1 amd64 query and manipulate user account information
ii accountwizard 4:17.12.3-0ubuntu1 amd64 wizard for KDE PIM applications account setup
ii acl 2.2.52-3build1 amd64 Access control list utilities
ii acpi-support 0.142
@craftzdog
craftzdog / packages.txt
Created May 28, 2018 01:35
Ubuntu 18.04
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==========================================-===================================-============-===============================================================================
ii accountsservice 0.6.45-1ubuntu1 amd64 query and manipulate user account information
ii acl 2.2.52-3build1 amd64 Access control list utilities
ii acpi-support 0.142 amd64 scripts for handling many ACPI events
ii acpid 1:2.0.28-1ubuntu1 amd64 Advanced Configuration and Power Interface event daemon
ii ad
// @flow
import { type HOC } from 'recompose'
import { connect } from 'react-redux'
import type { Dispatch, State } from '../types'
type F<M> = (state: State) => M
type CHOC<E: {}, M> = HOC<{ ...$Exact<E>, dispatch: Dispatch, ...M }, E>
export default function connectStore<Enhanced: {}, M: *>(
mapper: F<M>