Skip to content

Instantly share code, notes, and snippets.

View philwilt's full-sized avatar
🏗️
Building

Phil Wilt philwilt

🏗️
Building
View GitHub Profile
@philwilt
philwilt / eastside-bookmark.html
Created May 28, 2026 02:46
Megans ESS Bookmark
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Eastside Soil Solutions — Compost Bookmark</title>
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Lato:wght@300;400;700&display=swap" rel="stylesheet">
<style>
/* ── Screen layout ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
@philwilt
philwilt / birthday.md
Created November 14, 2025 17:13
gpt-oss-120b birhday

USER

what are good ideas for a 41st birthday party on november 15th in washington state in the fall with rain and leaves changing colors and falling.

ASSISTANT

USER

what are good ideas for a 41st birthday party on november 15th in washington state in the fall with rain and leaves changing colors and falling.

ASSISTANT

class EventsController < ApplicationController
def index
@events = Event.all.reverse
end
end
@philwilt
philwilt / binaryTree
Created December 2, 2014 18:57
Binary Tree Ancestor
class Node
constructor: (val) ->
@val = val
@left = null
@right = null
findAncestors = (node, val, arr) ->
return false if node == null
if node.val == val
return arr.push(val)
@philwilt
philwilt / analyze_stocks
Last active August 29, 2015 14:10
stock_prices
def analyze_stocks(prices)
best_buy_day = nil
best_sell_day = nil
max_profit = 0
prices.each_with_index do |buy_price, buy_day|
prices.slice(buy_day..prices.length).each_with_index do |sell_price, sell_day|
profit = sell_price - buy_price
if profit > max_profit
best_sell_day = buy_day + sell_day + 1
@philwilt
philwilt / version strategy
Created November 1, 2014 02:20
api versioning
URI Versioning:
-Good for namespace routes
-Bad for aesthetics
Header:
-Good for pretty urls
-Bad cause its less clear what's happening and have to set on every request
Accept header:
-Kinda the same as header
@philwilt
philwilt / bst
Last active August 29, 2015 14:08
binary search tree
class BinarySearchTree
constructor: () ->
@val = null
@size = 0
@right = null
@left = null
insert: (val) ->
if (@val == null)
@philwilt
philwilt / angular vocab
Created October 28, 2014 03:56
angular notes
module - way of compartmentalizing pieces of code for similar functionality
scope - app context
data binding - connecting UI and biz logic
directives - attach functionality to DOM
controllers - functionality for models
dependency injection - dependencies for controllers and modules
Discontinued in 2.0:
Controllers
Directive Definition Object
@philwilt
philwilt / commentscreate
Created September 30, 2014 03:03
comment on article code
# view/comments/_form.html.haml
= form_for(@comment) do |f|
- if @comment.errors.any?
#error_explaination
%h2= pluralize(@comment.errors.count, 'error')
%ul
- @comment.errors.full_message.each do |message|
%li= message
.field
@philwilt
philwilt / bourbon-rails
Last active August 29, 2015 14:06
Rails with bourbon neat with bitters and refills
# Gemfile
# styles and structure for bourbon
gem 'bitters'
# sass mixins
gem 'bourbon'
# grid framework for bourbon
gem 'neat'
# patterns for bourbon
gem 'refills'