Skip to content

Instantly share code, notes, and snippets.

@artspb
artspb / main.go
Created September 9, 2021 16:11
Example of a method call on a type.
package main
type Type struct{}
func (Type) foo(string) {}
func main() {
var t Type
t.foo("")
Type.foo(t, "")
@artspb
artspb / project.sh
Created May 6, 2021 08:42
A way to update GOROOT and Go modules integration for a GoLand project.
#!/bin/bash
sed -i.bak '/<component name="GOROOT".*/d' ".idea/workspace.xml"
sed -i.bak '/<project.*/a\
<component name="GOROOT" url="file://$USER_HOME$/go/go1.16.3" />\
' ".idea/workspace.xml"
sed -i.bak '/<component name="VgoProject">/,+2d' ".idea/workspace.xml"
sed -i.bak '/<project.*/a\
<component name="VgoProject">\
@State(Scope.Thread)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
public class MegamorphicList {
private List<String>[] strings;
@Setup(Level.Trial)
public void init() {
strings = new List[]{getArrayList1(6), getArrayList2(6), getArrayList3(6), getArrayList(6), getFactoryList6(), getUnModifiableList(6)};
}
package de.espend.idea.php.annotation.reference;
import com.intellij.openapi.util.TextRange;
import com.intellij.patterns.PlatformPatterns;
import com.intellij.psi.*;
import com.intellij.util.ArrayUtil;
import com.intellij.util.IncorrectOperationException;
import com.intellij.util.ProcessingContext;
import com.jetbrains.php.PhpIndex;
import com.jetbrains.php.lang.documentation.phpdoc.lexer.PhpDocTokenTypes;

Keybase proof

I hereby claim:

  • I am artspb on github.
  • I am artspb (https://keybase.io/artspb) on keybase.
  • I have a public key whose fingerprint is A289 60D8 C68F 0634 8967 9E97 0E0D F2DD 57B0 6019

To claim this, I am signing this object: