Skip to content

Instantly share code, notes, and snippets.

View Zoybean's full-sized avatar

Zoey Hewll Zoybean

View GitHub Profile
@JAffleck
JAffleck / editWithNeoVIm.reg
Created June 17, 2018 05:42
Neovim - Edit With Neovim WIndows Context menu
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Neovim]
@="Edit with Neovim"
"Icon"="C:\\tools\\neovim\\Neovim\\bin\\nvim-qt.exe"
[HKEY_CLASSES_ROOT\*\shell\Neovim\command]
@="\"C:\\tools\\neovim\\Neovim\\bin\\nvim-qt.exe\" \"%1\""
anonymous
anonymous / Maybe::match
Created January 9, 2018 01:18
A demonstration of haskell-style pattern matching in java
public abstract class Maybe<V>
{
public abstract <T> T match(Function<V, T> some, Supplier<T> none);
public abstract void match(Consumer<V> some, Runnable none);
...
private static class Nothing<U> extends Maybe<U>
{
...
public <T> T match(Function<U, T> some, Supplier<T> none)
{
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active May 26, 2024 18:57
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@lynn
lynn / vimanim.py
Last active April 16, 2024 15:14
make animated GIFs out of vim commands!
#!/usr/bin/env python3
r"""vimanim - make animated GIFs out of vim commands!
Usage:
vimanim <code> <output.gif> [<input>] [options]
<code> should contain the exact bytes to feed to vim.
This means: raw newlines for <Enter>, raw \x1b bytes for <Esc>, etc.
Some UTF-8 codepoints have special meaning, though:
@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork git@github...my-fork.git