Skip to content

Instantly share code, notes, and snippets.

View randycoulman's full-sized avatar

Randy Coulman randycoulman

View GitHub Profile
@randycoulman
randycoulman / StoreSCM.java
Created June 14, 2012 23:53
Why is the optional block starting out unchecked, but expanded?
public class StoreSCM extends SCM {
private String parcelBuilderInputFilename;
@DataBoundConstructor
public StoreSCM(String parcelBuilderInputFilename) {
this.parcelBuilderInputFilename = parcelBuilderInputFilename;
}
public String getParcelBuilderInputFilename() {
return parcelBuilderInputFilename;
@randycoulman
randycoulman / ViewControllerTests.swift
Last active March 5, 2016 21:49
Base class for view controller tests in Swift
@testable import MyApp
import UIKit
import XCTest
class ViewControllerTests: XCTestCase {
var storyboard: UIStoryboard!
func storyboardName() -> String {
return "Main"
}
@randycoulman
randycoulman / makeHOC.js
Created October 13, 2018 17:26
Working around non-async `submitForm` in Formik
import { compose, setDisplayName, wrapDisplayName } from "recompose";
export const makeHOC = (name, ...enhancers) => Component =>
compose(
setDisplayName(wrapDisplayName(Component, name)),
...enhancers
)(Component);
@randycoulman
randycoulman / resources.md
Last active February 7, 2024 22:01
Go-To Resources
@randycoulman
randycoulman / recompile_elixir_ls.md
Last active August 22, 2023 20:50
Recompiling ElixirLS

When ElixirLS is compiled with a different version of Elixir/Erlang than we use in our projects, it is unable to show pop-up documentation and auto-completion for certain constructs (like imports or requires done by a using block).

To check if you have a version mismatch, you can scroll to the top of the output pane for ElixirLS (VSCode View -> Output, then select ElixirLS from the dropdown list).

ElixirLS v0.13.0 and Later

In v0.13.0, vscode-elixir-ls added the ability to override the default elixirLS release path in config. This allows us to recompile elixirLS with whichever versions of Elixir and Erlang we like and then tell the extension to use that version. It should even be possible to compile with multiple different Elixir/Erlang combinations and use different versions in different projects, though I haven't tried that yet.

Here's how to do this: