Portable Git aliases for reading a codebase through its history before opening files.
Inspired by Ally Piechowski's post:
Portable Git aliases for reading a codebase through its history before opening files.
Inspired by Ally Piechowski's post:
| Title: Senior Engineer Task Execution Rule | |
| Applies to: All Tasks | |
| Rule: | |
| You are a senior engineer with deep experience building production-grade AI agents, automations, and workflow systems. Every task you execute must follow this procedure without exception: | |
| 1.Clarify Scope First | |
| •Before writing any code, map out exactly how you will approach the task. | |
| •Confirm your interpretation of the objective. |
| # | |
| # Klipper configuration file for Anycubic i3 MEGA S | |
| # | |
| # This config file contains settings of all printer pins (steppers, sensors) for Anycubic i3 mega S with TMC2208 Drivers with stock plug orientation | |
| # Klipper firmware should be compiled for the atmega2560 | |
| # | |
| # Config file includes | |
| # - Original or 2208(2209) rotated by cable drivers | |
| # - Mesh bed leveling: BLtouch (3DTouch sensor from Triangelab) | |
| # - Manual meshed bed leveling (commented out) |
| 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 |
I recently wanted to rename a model and its postgres table in a Phoenix app. Renaming the table was simple and documented, but the table also had constraints, sequences, and indexes that needed to be updated in order for the Ecto model to be able to rely on default naming conventions. I couldn't find any examples of what this would look like but was eventually able to figure it out. For anyone else in the same situation, hopefully this example helps.
In the example below, I'm renaming the Permission model to Membership. This model belongs to a User and an Account, so it has foreign key constraints that need to be renamed.
defmodule MyApp.Repo.Migrations.RenamePermissionsToMemberships do
use Ecto.Migration
If you want a run-down of the 1.3 changes and the design decisions behidn those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8
To use the new phx.new project generator, you can install the archive with the following command:
$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez
Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs:
| ! model | |
| pc101 Generic 101-key PC | |
| pc102 Generic 102-key (Intl) PC | |
| pc104 Generic 104-key PC | |
| pc105 Generic 105-key (Intl) PC | |
| dell101 Dell 101-key PC | |
| latitude Dell Latitude series laptop | |
| dellm65 Dell Precision M65 | |
| everex Everex STEPnote | |
| flexpro Keytronic FlexPro |
NOTE: This guide has moved to https://github.com/bpierre/switch-to-vim-for-good
This guide is coming from an email I used to send to newcomers to Vim. It is not intended to be a complete guide, it is about how I switched myself.
My decision to switch to Vim has been made a long time ago. Coming from TextMate 1, I wanted to learn an editor that is Open Source (so I don’t lose my time learning a tool that can be killed), cross platform (so I can use it everywhere), and powerful enough (so I won’t regret TextMate). For these reasons, Vim has always been the editor I wanted to learn, but it took me several years before I did it in a way that works for me. I tried to switch progressively, using the Janus Vim distribution for a few months, then got back to using TextMate 2 for a time, waiting for the next attempt… here is what finally worked for me.
Original gist with comments: https://gist.github.com/bpierre/0a0025d348b6001394e0
| # -*- mode: haproxy -*- | |
| # vi: set ft=haproxy : | |
| defaults | |
| log global | |
| mode http | |
| option forwardfor | |
| option dontlognull | |
| option redispatch | |
| option http-server-close |
| bind generic f !@git fetch | |
| bind generic p !@git pull | |
| bind generic P !@git push | |
| bind generic { !?git push -f | |
| bind generic r !git rebase -i master | |
| bind generic U !@git up | |
| bind generic M !@git checkout master | |
| bind generic ! !@git reset HEAD^ | |
| bind generic @ !@?git reset --hard HEAD^ | |
| bind generic a !git commit --amend |