Skip to content

Instantly share code, notes, and snippets.

@cserb
cserb / init.lua
Created April 15, 2023 09:30
NomicFoundation Solidity Language Server – LSP-Zero Setup for NeoVim
require('lspconfig.configs').solidity = {
default_config = {
cmd = {'nomicfoundation-solidity-language-server', '--stdio'},
filetypes = { 'solidity' },
name = 'solidity',
root_dir = require('lspconfig.util').find_git_ancestor,
single_file_support = true,
}
}
require('lspconfig').solidity.setup({})
@cserb
cserb / 1_result.cr
Last active March 20, 2020 09:18
Result Monad in Crystal Lang
enum Either
Ok
Err
end
struct Result(T)
getter value : T
getter type : Either
def initialize(@value, @type); end
@cserb
cserb / dag.cr
Created January 20, 2020 20:14
Probabilistic Finality in Crystal
module DAG
record Tip,
vertex : DAG::Vertex,
distance : Int32,
branch_root : (DAG::Vertex | Nil)
class Vertex
alias Name = String
getter name : Name
@cserb
cserb / terminal_editor_color_palettes.md
Last active May 17, 2018 10:19
Terminal & Editor Color Palettes
pg_dump --no-owner --no-acl blah > blah.psql
@cserb
cserb / keybase.md
Last active February 5, 2016 15:41

Keybase proof

I hereby claim:

  • I am cserb on github.
  • I am cserb (https://keybase.io/cserb) on keybase.
  • I have a public key ASBnSNeutFF_rhmogd2VHaMOuRzCDkprwfBLkeBc6cWgcwo

To claim this, I am signing this object:

@cserb
cserb / deploy.rb
Created June 3, 2014 16:20
queue_classic and capistrano
namespace :qc do
desc "start queue classic"
task :start do
run "nohup sh #{current_path}/qc_worker start > /dev/null 2>&1 &"
end
desc "stop queue classic"
task :stop do
run "sh #{current_path}/qc_worker stop"
end