Skip to content

Instantly share code, notes, and snippets.

@slavingia
slavingia / create_pr.sh
Created September 13, 2024 17:13
Create a (draft) pull request using GitHub CLI
#!/bin/bash
# Create a (draft) pull request using GitHub CLI.
# It assigns the PR to the current user, fills in the title from the first commit,
# and uses the PR template file for the description.
set -euo pipefail
# Colors for output
RED='\033[0;31m'
@cbh123
cbh123 / settings.json
Last active January 23, 2024 23:00
vscode-settings
{
"workbench.startupEditor": "none",
"editor.inlineSuggest.enabled": true,
"editor.fontSize": 12,
"editor.lineHeight": 0,
/**
Tailwind extension stuff - https://pragmaticstudio.com/tutorials/formatting-heex-templates-in-vscode
*/
"tailwindCSS.includeLanguages": {
"plaintext": "html",
@cbh123
cbh123 / copy-to-clipboard.md
Last active July 30, 2023 01:30
Dynamic copy to clipboard for phoenix liveview

Dynamic copy to clipboard for phoenix liveview. I wrote more about it here.

Setup

  1. Add this to core_components.ex:
  attr :id, :string, required: true
  attr :content, :string, required: true

  @doc """