Skip to content

Instantly share code, notes, and snippets.

@mhartington
mhartington / blink.cmp.lua
Created March 30, 2025 23:43
blink vs nvim.cmp
@mhartington
mhartington / CustomTheme
Last active September 3, 2025 08:35
If you want to make a custom theme for ionic, and are using scss, this is a base to get you started
//Custom Theme test
// Colors
// -------------------------------
$custom: #057b6c !default;
// Buttons
// -------------------------------
$button-custom-bg: $custom !default;
@mhartington
mhartington / snacks.lua
Created April 9, 2025 11:49
snacks config
{
"folke/snacks.nvim",
---@type snacks.Config
opts = {
bigfile = { enabled = false },
statuscolumn = { enabled = true, right = { "git" } },
dim = { animate = { enabled = false } },
zen = { enabled = false },
notifier = { enabled = true, style = "minimal", top_down = false },
picker = {
local function save_opts()
original_opts = vim.o
end
local function hide_stuff()
vim.o.fillchars = "stl: ,stlnc: ,vert: ,diff: ,msgsep: ,eob: ,horiz: ,horizup: ,horizdown: "
vim.o.number = false
vim.o.relativenumber = false
vim.o.showtabline=0
end
local luasnip = require("luasnip")
local cmp = require("cmp")
local lspkind = require("lspkind")
local c = require("oceanic-next.config").colors
local darken = require('oceanic-next.utils').darken
local lighten = require('oceanic-next.utils').lighten
local t = function(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
@mhartington
mhartington / git-conventions.md
Last active August 31, 2024 06:38
Git Conventions

You've been working locally for awhile. You're ready to push some changes, but someone else pushed something! You have to pull in their changes before you can push yours.

git pull origin master forces you to create a merge commit, which is annoying.

Instead, do git pull --rebase origin master. This will effectively:

  1. Stash your changes
  2. Pull in the changes from origin
  3. Apply your changes on top

No merge commit!

@-moz-document domain("amazon.co.uk"), domain("amazon.com"), domain("amazon.ca"), domain("amazon.de"), domain("amazon.it"), domain("amazon.es"), domain("amazon.fr"), domain("amazon.com.mx"), domain("amazon.co.jp"), domain("amazon.com.au"), domain("amazon.in")
{
body
{
font-size: 13px;
line-height: 19px;
color: #aaa !important;
font-family: 'Open Sans', Arial, sans-serif;
background-color: #1c1f26 !important;
}
// ==UserScript==
// @name YouTube Patch Collection
// @match https://www.youtube.com/*
// @icon https://www.youtube.com/favicon.ico
// @run-at document-start
// @grant none
// ==/UserScript==
// Attributes to remove from <html>
const ATTRS = [
function! s:expand_html_tab()
" try to determine if we're within quotes or tags.
" if so, assume we're in an emmet fill area.
let line = getline('.')
if col('.') < len(line)
let line = matchstr(line, '[">][^<"]*\%'.col('.').'c[^>"]*[<"]')
if len(line) >= 2
return "\<C-n>"
endif
async toggle() {
if (!this._playerModal) {
const { PlayerModalComponent } = await import( '../player-modal/player-modal.component');
this._playerModal = PlayerModalComponent;
}
const modalInstance = await this.modalCtrl.create({
component: this._playerModal,
swipeToClose: true,
cssClass: 'full-modal',
});