Skip to content

Instantly share code, notes, and snippets.

View dkarter's full-sized avatar

Dorian Karter dkarter

View GitHub Profile
@hugobarauna
hugobarauna / kino_json_input_poc.livemd
Last active April 9, 2024 15:06
Kino JSON input with syntax highlight

Kino JSON Input Proof of Concept

Mix.install([
  {:kino, "~> 0.12.3"},
  {:jason, "~> 1.4"}
])
@pdgonzalez872
pdgonzalez872 / hire_elixir_devs.md
Last active November 9, 2023 16:39
Hire Elixir devs - Part of an email reply to a recruiter

I'm a member of the Erlang Ecosystem Foundation (https://erlef.org/) and part of that in my opinion is making sure folks know how to reach Elixir devs when they need to. I'm very interested in helping you showcase that your company is hiring so heavily for Elixir. Since you were kind in our email exchange, I'll return the kindness and hopefully help you find as many Elixir devs you can hire :). Just promise me to keep creating more Elixir jobs : ) :

Here are some interesting ways to find Elixir devs:

@lancethomps
lancethomps / close_notifications_applescript.js
Last active April 8, 2024 07:43
AppleScript to close all notifications on macOS Big Sur, Monterey, and Ventura
function run(input, parameters) {
const appNames = [];
const skipAppNames = [];
const verbose = true;
const scriptName = "close_notifications_applescript";
const CLEAR_ALL_ACTION = "Clear All";
const CLEAR_ALL_ACTION_TOP = "Clear";
@kizzx2
kizzx2 / commitlint.vim
Created March 7, 2018 08:17
ALE Linter for commitlint
function! ale_linters#gitcommit#commitlint#Handle(buffer, lines) abort
" Matches patterns line the following:
let l:pattern = '^\(✖\|⚠\)\s\+\(.*\) \(\[.*\]\)$'
let l:output = []
let l:line = getline(1)
if l:line[0] != '#'
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:item = {
\ 'lnum': 1,
@romainl
romainl / devdocs.md
Last active June 19, 2023 04:31
Look up keywords on https://devdocs.io from Vim
@mknabe
mknabe / README.md
Last active September 18, 2021 09:14
React component to warn users about unsaved changes to forms when they attempt navigate away from the page using redux-form

Use with the following

  • react-router
  • redux-form

You must use this compontent on the route component where the form is shown not on the form component itself. This is because this.props.route is only added to route components, and I didn't want to pass that down through props.

Inspired by this Codepad

Feedback appreciated

@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@charlietran
charlietran / TerminalVim.scpt
Last active October 14, 2023 06:50
Open file in iTerm vim for MacOS Sierra
-- TerminalVim.app
-- This creates a shim Application that will enable you to open files from the Finder in vim using iTerm
-- To use this script:
-- 1. Open Automator and create a new Application
-- 2. Add the "Run Applescript" action
-- 3. Paste this script into the Run Applescript section
-- 4. Save the application as TerminalVim.app in your Applications folder
-- 5. In the Finder, right click on a file and select "Open With". In that window you can set TerminalVim as a default
@ryancdotorg
ryancdotorg / frag32.py
Created August 20, 2015 16:27
A FAT32 fragmenter, because I am a horrible person.
#!/usr/bin/env python
import random
import struct
import sys
# Most of the Fat32 class was cribbed from https://gist.github.com/jonte/4577833
def ppNum(num):
return "%s (%s)" % (hex(num), num)
@jamenlyndon
jamenlyndon / iframe.html
Last active December 28, 2023 04:30
Resize iframe height to fit content (works cross domain)
<script type='text/javascript' src="js/jquery.min.js"></script>
<script type='text/javascript'>
// Size the parent iFrame
function iframeResize() {
var height = $('body').outerHeight(); // IMPORTANT: If body's height is set to 100% with CSS this will not work.
parent.postMessage("resize::"+height,"*");
}
$(document).ready(function() {
// Resize iframe