Skip to content

Instantly share code, notes, and snippets.

@lifeart
lifeart / Lazy.ts
Last active July 24, 2022 11:39
Lazy glimmer 2 components
import { createTemplate, setComponentTemplate, templateOnlyComponent } from '@glimmer/core';
export default setComponentTemplate(
createTemplate(`<h1 ...attributes>AMA LAZY [{{@name}}]</h1>`),
templateOnlyComponent()
);
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@lifeart
lifeart / index.html
Last active May 24, 2021 18:56
GlimmerLite web components example
<!doctype html>
<html>
<head>
<title>Glimmer Demo</title>
</head>
<body>
<script src="./app.bundle.js"></script>
<example-app />
</body>
</html>
@naesean
naesean / jsonapi_oas.yml
Last active September 9, 2024 07:32
OpenAPI 3.0 schemas that comply with the JSON:API 1.0 specification
JSONAPIObject:
description: Includes the current JSON:API version for this specification as well as optional meta information
type: object
required:
- version
properties:
version:
type: string
default: '1.0'
example: '1.0'
@BenderV
BenderV / gist:44901bac756ff3b8279d018eb1e2cc1f
Created March 19, 2017 18:21
#Podcast Knowledge Project: Naval Ravikant
Just do something, doesn't matters what
Book == blog archives. Feel free to scram
We are creatures of habits (but don't condition habits with identity/ego). Have deliberate habits
Stopping alcohol
Unpack causes
- availability
- desire
Availability => Early morning sport. Force to not go out at night too much.
Desire

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@bmhatfield
bmhatfield / .profile
Last active November 14, 2024 12:11
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@dodeja
dodeja / widget.html
Last active February 2, 2016 22:41
Terminal 49 Embed Widget
<style media="screen" type="text/css">
.t49-cta { max-width: 430px; font-family: sans-serif; margin: 15px; }
.t49-cta a { color: #0275d8; text-decoration: none; }
.t49-cta .copy { padding: 15px; border-bottom: 1px solid #ccc; }
.t49-cta .form { text-align: center;padding: 10px; border-top: 1px solid #efefef; background: #efefef; border-radius: 0 0 4px 4px; }
.t49-cta h1 { margin: 0; font-size: 20px; font-weight: 300; color: #66afe9; }
.t49-cta .tsearch { min-width: 300px; padding: 0.375rem 0.75rem; line-height: 1.5; color: #55595c; border: 1px solid #66afe9;
font-size: 14px; font-weight: 300; color: black; border-radius: 5px 0 0 5px; border-right-width: 0;}
.t49-cta .btn { z-index: 2; margin-left: -4px;display: inline-block; background: white; border: 1px solid #0275d8;
color: #0275d8; font-size: 14px; font-weight: 300; border-radius: 0 5px 5px 0; user-select: none; padding: 0.375rem 1rem;
@code0100fun
code0100fun / app_controllers_sign-in.js
Created June 8, 2015 20:02
Ember Simple AUth + Ember CLI Mirage
// app/controllers/sign-in.js
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
signIn(){
this.set('errors', null);
var params = { identification: this.get('email'), password: this.get('password') };
// Redirects to index route on success (configurable in config/environment.js)
this.get('session').authenticate('simple-auth-authenticator:oauth2-password-grant', params);
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do