Skip to content

Instantly share code, notes, and snippets.

View wookiehangover's full-sized avatar
💭
just setting up my gthb...

Sam Breed wookiehangover

💭
just setting up my gthb...
View GitHub Profile
css = """
.gradio-container {
--block-radius: 4px;
--block-label-radius: 4px;
--font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
--layout-gap: 2rem 1rem;
--text-xxl: 1.75rem;
--text-xl: 1.5rem;
--text-lg: 1.25rem;
--text-md: 1rem;
@wookiehangover
wookiehangover / mackey.ahk
Created July 11, 2023 18:13
autohot key mac-ish shortcuts
; --------------------------------------------------------------
; Application specific
; --------------------------------------------------------------
; Google Chrome
#IfWinActive, ahk_class Chrome_WidgetWin_1
; Show Web Developer Tools with cmd + alt + i
#!i::Send {F12}

useExtendedStyles() hook

This hook is used to modify an object of Tailwind classNames.

Usage

import { useExtendedStyles } from '@sutterhill/hooks'

const defaultStyles = {
@wookiehangover
wookiehangover / planter-box.md
Last active May 1, 2022 02:27
Sam's Planter Box

Buy List

  • Six 8' 2x6's (or at least 48 board-feet)
  • One 8' 2x4
  • 1 box 4" screws
  • 1 box 2 1/2 screws
  • Water proof stain + brush
  • (optional) chicken wire to cover 3'x5'

Cut List

  • Six 60" 2x6 for the sides
  • Dynamic HTML comes from individual bundles compiled for every server rendered page.
    • The contents of each astro template determine if a page is static or dynamic:
      • Static pages output complete HTML documents at build time
      • Dynamic pages output ES Modules that are run on a server
    • Each bundle should be and ES Module that exports a standard interface with methods for creating
      • HTML payloads
        • an entire document for full page requests
        • a partial document for incremental updates
      • a JSON payload with the props for the template
  • Individual bundles makes for an ideal target for serverless functions and makes a path for hybrid CDN + SSR deployments
'use strict'
class JSONMap extends Map {
constructor (value) {
let mapArgs = []
if (value) {
for (let k of Object.keys(value)) {
mapArgs.push([ k, value[k] ])
}
}
@wookiehangover
wookiehangover / svg-header.js
Created April 25, 2014 17:08
QL.com SVG header
//= require snap.svg-min
(function(){
var defaultCoordMultiplier = 50;
var shapeSpacingMultiplier = .45;
var tilt = 3;
var height = 8;
var width = 4;
var origin = { x: 0, y: 0 };
@wookiehangover
wookiehangover / webkit-custom-scrollbar.css
Created February 4, 2011 21:02
Super-dooper hot webkit only scroll bar. This will fallback to use the default styles in FF & IE
@media screen and (-webkit-min-device-pixel-ratio:0) {
/* Custom Webkit scroll bar, super fucking dope
http://beautifulpixels.com/goodies/create-custom-webkit-scrollbar/ */
body { position:absolute; top:0px; left:0; bottom:0; right:10px; overflow-y:scroll; overflow-x:hidden;}
html {
overflow-y: auto;
background-color: transparent;
}
::-webkit-scrollbar {
@wookiehangover
wookiehangover / mac-keys.txt
Created August 11, 2018 18:03
autohotkey config for Mac OS-like keyboard friendliness
; --------------------------------------------------------------
; Application specific
; --------------------------------------------------------------
; Google Chrome
#IfWinActive, ahk_class Chrome_WidgetWin_1
; Show Web Developer Tools with cmd + alt + i
#!i::Send {F12}
@wookiehangover
wookiehangover / gdax-stream.js
Last active May 11, 2017 04:01
GDAX WebSocket Rolling Stats
'use strict'
const Gdax = require('gdax')
const h = require('highland')
const streamStatistics = require('stream-statistics')
const websocket = new Gdax.WebsocketClient(['BTC-USD'])
const tickerStream = exports.tickerStream = (s = websocket) =>
h('message', s)
.stopOnError(() =>