Skip to content

Instantly share code, notes, and snippets.

View collinvandyck's full-sized avatar
🏠
Working from home

Collin Van Dyck collinvandyck

🏠
Working from home
  • Rippling
  • Durham, NC
View GitHub Profile
@collinvandyck
collinvandyck / actionlist.vim
Created August 6, 2023 15:36 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@collinvandyck
collinvandyck / tree.rs
Created May 27, 2023 20:04
first rust binary tree
use rand::Rng;
use std::fmt::Display;
fn main() {
let mut rng = rand::thread_rng();
let mut t = Tree::new();
for _ in 0..10 {
let v = rng.gen_range(0..100);
t.add(v)
}
package main
import (
"bytes"
"math/rand"
"time"
tea "github.com/charmbracelet/bubbletea"
)
package encryption
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"crypto/rsa"
"fmt"
"testing"

Since the latest update (2018.3) i've run into a number of issues:

Support for import aliases

I am importing some go packages that have different package names from what their import url would suggest. Previously it was able to deal with this. Now, Goland will sometimes delete a whole bunch of imports. I found after some trial and error that this mostly happened with these kinds of imports. I'm able to "fix" it by defining an alias for that import and then using the alias.

Commit dialog issues with File Watchers

When I try to commit code through the editor, I will frequently get an error dialog saying that the commit failed because something else (the file watcher) is writing to disk. I have to cancel the commit, let it save, and then recommit. My work around for this is to just do my commits in a separate terminal application.

type waitGroup struct {
sync.WaitGroup
}
func (wg *waitGroup) DoneChan() chan struct{} {
ch := make(chan struct{})
go func() {
defer close(ch)
wg.Wait()
}()
package main
import (
"math/rand"
"testing"
)
type mapType map[int64]struct{}
type sliceType []int64

Keybase proof

I hereby claim:

  • I am collinvandyck on github.
  • I am keys_so_fresh (https://keybase.io/keys_so_fresh) on keybase.
  • I have a public key whose fingerprint is B15B 99AA FB14 467B BA53 050F 00D5 B8EF 8827 C137

To claim this, I am signing this object:

import com.librato.alerts.IEmitter;
public class DoubleDispatch {
static IEmitter emitter;
public static void main(String[] args) {
IMessage messageA = new MessageA();
IMessage messageB = new MessageB();
// without double dispatch
package models
type concurrent struct {
fns []func() (interface{}, error)
}
func (this *concurrent) addFn(fn func() (interface{}, error)) *concurrent {
this.fns = append(this.fns, fn)
return this
}