Skip to content

Instantly share code, notes, and snippets.

View allmarkedup's full-sized avatar

Mark Perkins allmarkedup

View GitHub Profile
@mihkeleidast
mihkeleidast / preview.twig
Created March 1, 2019 18:44
Fractal twig preview
<!DOCTYPE html>
<html class="no-js" lang="{{ language }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<link rel="apple-touch-icon" sizes="180x180" href="{{ '/inc/favicon/apple-touch-icon.png'|path }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ '/inc/favicon/favicon-32x32.png'|path }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ '/inc/favicon//favicon-16x16.png'|path }}">
<link rel="manifest" href="{{ '/inc/favicon/manifest.json'|path }}">
@mihkeleidast
mihkeleidast / preview.tsx
Created March 1, 2019 18:45
Fractal React preview template
import React from 'react';
export interface IPreviewEnv {
reactClass: string;
publicPath: string;
}
export interface IPreviewTargetMeta {
previewDisplay?: React.StyleHTMLAttributes<HTMLBodyElement>;
}
@gwillem
gwillem / dell-xps-9310-linux-install-notes.md
Created November 25, 2020 09:43
Linux (Xubuntu 20.04) on Dell XPS 9310 install notes

Dell XPS 9310 Linux install notes (Ubuntu/Xubuntu 20.04)

My NL i7/16GB XPS 9310 has a Killer AX1650s WiFi chip, which eventually worked. Other Killer chips may not work.

I ordered the Windows Home edition, because developer edition with Linux was not available in my country. Apparently you can reclaim €100 from Dell if you don't use Windows.

Install

  • Bios:
  • Change the SATA Mode from the default "RAID" to "AHCI"
@dralletje
dralletje / awesome-line-wrapping.js
Created September 25, 2021 20:25
Codemirror 6 line wrapping that preserves indentation
import _ from "lodash"
import { StateEffect, StateField } from "@codemirror/state"
import { EditorView, Decoration } from "@codemirror/view"
/**
* Plugin that makes line wrapping in the editor respect the identation of the line.
* It does this by adding a line decoration that adds padding-left (as much as there is indentation),
* and adds the same amount as negative "text-indent". The nice thing about text-indent is that it
* applies to the initial line of a wrapped line.
*
@JoelQ
JoelQ / dollar.rb
Last active September 23, 2024 03:02
Implementing value object semantics as an RSpec shared_example.
class Dollar
attr_reader :cents
def initialize(cents:)
@cents = cents
end
def hash
[self.class, cents].hash
end
@scottwater
scottwater / clsx.rb
Created March 14, 2023 00:58
Quick Ruby implementation of https://www.npmjs.com/package/clsx
module Clsx
def clsx(*args)
process_args = args.map do |arg|
if arg.is_a?(Array)
clsx(*arg)
elsif arg.is_a?(Hash)
arg.map do |key, value|
key if value
end
else

🆕 Update: See more extensive repo here: https://github.com/marckohlbrugge/unofficial-37signals-coding-style-guide

The Unofficial 37signals/DHH Rails Style Guide

About This Document

This style guide was generated by Claude Code through deep analysis of the Fizzy codebase - 37signals' open-source project management tool.

Why Fizzy matters: While 37signals has long advocated for "vanilla Rails" and opinionated software design, their production codebases (Basecamp, HEY, etc.) have historically been closed source. Fizzy changes that. For the first time, developers can study a real 37signals/DHH-style Rails application - not just blog posts and conference talks, but actual production code with all its patterns, trade-offs, and deliberate omissions.