Skip to content

Instantly share code, notes, and snippets.

const StyleDictionary = require('style-dictionary');
/**
* @description Some tokens are composites, defined with several other tokens. For example, typography. It is convenient to be able to have
* a single token which fully defines everything we need, but
* 1) Sometimes they can't. For example, css `type` can't define `letter-spacing`.
* 2) Sometimes we want to access a particular value separately. For example, the width of a border.
*
* This base class provides the foundation to extract a single expansion from a particular type of composite token.
* In the future, if we need to expand multiple components, we'll add that functionality.
@yringler
yringler / formatter.js
Created June 16, 2023 07:13
style dictionary formatter to add a sibling letter spacing token to typogrophy tokens.
const StyleDictionary = require('style-dictionary');
/**
* The css font shorthand can hold each part of the composite token studio typography token, except for
* letter spacing.
* This formatter creates a partner letter spacing token for each typography token.
* For example:
* --type-100: var(--global-font-weight-extrabold) var(--font-size-1)/var(--line-height-3x-dense) var(--font-nunito-sans);
* --type-100-letter-spacing: var(--global-letter-spacing-5x-loose);
*/
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home: Scaffold(
body: Center(child: Calculator()),
),
),
);
const { rxObserver } = require('api/v0.3');
const { timer } = require('rxjs');
const { take, map, shareReplay, tap } = require('rxjs/operators');
const source = timer(10, 10)
.pipe(
map(time => `${time} deciseconds`),
take(5),
tap (x => console.log(x)),
shareReplay(1)
#!/bin/bash
# Include any branches for which you wish to disable this script
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(production dev)
fi
# Get the current branch name and check if it is excluded
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_EXCLUDED=$(printf "%s\n" "${BRANCHES_TO_SKIP[@]}" | grep -c "^$BRANCH_NAME$")
@yringler
yringler / clonedis.sh
Created July 16, 2020 17:52
Clone, setup, and build distributed cache
#!/bin/sh
cd /c
git clone [email protected]:yringler/distributed-middleware-cache.git
mv distributed-middleware-cache x
cd x
git checkout support-cache-auth-with-DI
git submodule init
git submodule update
dotnet build DistributedResponseCachingMiddleware
dotnet build WeatherApi
@yringler
yringler / TL-WN725N-debian.md
Last active September 8, 2019 18:24
TL-WN725N debian (bullseye)

How to enable TP-link TL-WN725N USB wifi dongle for Debian testing (bullseye)

This will also probably work for debian stable (buster)

  1. Add rtl8xxxu to /etc/modules. It must be the only text on its line.
  2. Install firmware-realtek package.
  3. Reboot

RE Step 1: This must be done as root.

@yringler
yringler / scrapelog.txt
Last active July 1, 2019 20:13
scraper misses
Too many here links
Tanya ChiTaS for Tishrei.
Regular Year.
<a href="http://www.insidechassidus.org/tanya/293-chitas-tanya-regular-year/1455-tishrei">Click here for all related material.</a>
Leap Year.
<a href="http://www.insidechassidus.org/tanya/294-chitas-tanya-leap-year/1557-tishrei">Click here for all related material.</a>
@yringler
yringler / scraped.json
Last active July 29, 2019 18:16
JSON created by inside scraper
This file has been truncated, but you can view the full file.
{
"Sections": {
"https://insidechassidus.org/alter-rebbe": {
"Title": "The Alter Rebbe",
"Description": "Listen to the audio classes of the history, lessons, and teachings of the Alter Rebbe, Rabbi Shneur Zalman of Liadi (The Rav). The Alter Rebbe was the student of the Maggid of Mezrich and the teacher and father of the Mitteler Rebbe. Presented by Rabbi Paltiel.\n\nThe Alter Rebbe was born on CHAI ELUL and passed away CHOF DALED TEVES.\n\nPart of the New Rebbeim Audio Series given by Rabbi Paltiel.",
"Pdf": null,
"ID": "https://insidechassidus.org/alter-rebbe",
"Sections": [],
"Lessons": [
"3351070380517391439",
@yringler
yringler / log.txt
Last active June 24, 2019 16:09
Pre/Post mortem flutter crash debug output
--------- beginning of main
06-24 12:07:36.727 710 14441 I Thermal-Lib: Thermal-Lib-Client: Client request sent
06-24 12:07:36.728 1055 1191 I ThermalEngine: Thermal-Server: Thermal received msg from override
--------- beginning of system
06-24 12:07:38.301 725 878 I SFPerfTracer: triggers: (rate: 97:3901) (6463908 sw vsyncs) (0 skipped) (0:5484323 vsyncs) (1:12201173)
06-24 12:07:40.191 13722 13722 I adbd : Calling send_auth_request...
06-24 12:07:43.351 1627 1646 I UsageStatsService: User[0] Flushing usage stats to disk
06-24 12:07:56.883 1063 1063 I ADSPD : Watchdog 2 new value: 004f73e6 Last Exp Value: ffffffff
06-24 12:07:56.885 1063 1063 I ADSPD : Watchdog 3 new value: 004f73e7 Last Exp Value: ffffffff
06-24 12:07:58.809 1627 2161 D BatteryService: uevent={POWER_SUPPLY_VOLTAGE_NOW=4078497, POWER_SUPPLY_CHARGE_RATE=Normal, POWER_SUPPLY_HEALTH=Good, POWER_SUPPLY_CURRENT_NOW=-374143, POWER_SUPPLY_PRESENT=1, SUBSYSTEM=power_supply, POWER_SUPPLY_TEMP=262, SEQNUM=352002, ACTION=ch