Skip to content

Instantly share code, notes, and snippets.

View trisweb's full-sized avatar
🕶️

Tristan Harward trisweb

🕶️
View GitHub Profile
@spiro-c
spiro-c / Readme.md
Last active October 17, 2025 18:12
Ledfx squeezelite docker-compose example

In the smae directory where the docker-compose.yml file is need to create config directory where LedFx config and log will be saved also there need to be crate pulse directory in this directory the pulsesocket will be saved so it can be shared with squeezelite create pulse-client-template.conf file in the same directory where the docker-compose.yml and inside put

# Connect to the host's server using the mounted UNIX socket
default-server = unix:/tmp/pulseaudio.socket

# Prevent a server running in the container
autospawn = no
daemon-binary = /bin/true
substitutions:
name: korvo-1
friendly_name: "Korvo 1"
ip_address: 192.168.1.101
wifi_ssid: iot
power_save: high
esphome:
name: ${name}
platformio_options:
@alekseykulikov
alekseykulikov / index.md
Last active February 6, 2025 21:20
Principles we use to write CSS for modern browsers

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@trisweb
trisweb / survey.html
Created July 9, 2014 20:09
Angular Survey using Firebase
<!DOCTYPE html>
<html ng-app="MyApp">
<!-- Made by Tristan Harward. BSD Licensed (because Berkeley > MIT) -->
<!--
Copyright (c) 2014, Tristan S. Harward
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@chrisb
chrisb / gist:4d6a09c6cc1ca2e1b14e
Last active November 25, 2022 04:15
Homebrew, Ruby, and Rails on OS X 10.10

OS X 10.10 Guide

Here's what I did to get things working.

1. Install Xcode 6

Yep, over at: https://developer.apple.com

2. Install the Command Line Tools (CLT)

@bomberstudios
bomberstudios / sketch-plugins.md
Last active July 16, 2025 18:21
A list of Sketch plugins hosted at GitHub, in no particular order.
@nbibler
nbibler / gist:5307941
Last active August 26, 2024 20:44
A .powrc file which works with RVM's .rvmrc or .ruby-version (+ .ruby-gemset) configuration files.
if [ -f "$rvm_path/scripts/rvm" ]; then
source "$rvm_path/scripts/rvm"
if [ -f ".rvmrc" ]; then
source ".rvmrc"
fi
if [ -f ".ruby-version" ]; then
rvm use `cat .ruby-version`
fi
@ryanbriones
ryanbriones / gist:3243872
Created August 3, 2012 02:54
Plain HTML "templates", with ERB layout, from Sinatra
class MySinatraApplication < Sinatra::Base
get "/some-mockup-path" do
html :somemockup
end
helpers do
def html(template, options = {}, locals = {})
render :html, template, options, locals
end
@harley
harley / gist:3118186
Created July 15, 2012 19:07
remove old branches that have been merged
# adapted from http://devblog.springest.com/a-script-to-remove-old-git-branches
# This has to be run from master
git checkout master
# Update our list of remotes
git fetch
git remote prune origin
# Remove local fully merged branches
@trisweb
trisweb / postgresql.rb
Created June 4, 2012 17:58
Homebrew PostgreSQL 9.2 Beta 2 Formula
require 'formula'
class Postgresql < Formula
homepage 'http://www.postgresql.org/'
url 'http://ftp.postgresql.org/pub/source/v9.2.0beta2/postgresql-9.2beta2.tar.bz2'
md5 'f23eca70a6de56de73f0005a571c71b0'
depends_on 'readline'
depends_on 'libxml2' if MacOS.leopard? # Leopard libxml is too old
depends_on 'ossp-uuid'