Skip to content

Instantly share code, notes, and snippets.

@Virviil
Virviil / osserver.go
Created March 8, 2025 15:14
OneShotServer
package osserver
import (
"context"
"log"
"net"
"net/http"
)
// Listener
package main
import (
"fmt"
"math/rand"
)
type Tree struct {
Left *Tree
Value int
# Instead of
print("Something")
# We should use
logger.info("Something")
[[tool.poetry.source]]
name = "nexus"
url = "http://nexus:8081/repository/python/simple"
secondary = true
[tool.poetry]
name = "foo"
version = "0.6.0"
description = ""
authors = ["Your Name <[email protected]>"]
Compiling fluent v0.1.0 (/Users/virviil/dev/elixir/fluent/native/fluent)
error[E0277]: the trait bound `unic_langid_impl::LanguageIdentifier: std::convert::From<unic_langid_impl::LanguageIdentifier>` is not satisfied
--> src/lib.rs:85:22
|
85 | let mut bundle = FluentBundle::new(&[langid_en]);
| ^^^^^^^^^^^^^^^^^ the trait `std::convert::From<unic_langid_impl::LanguageIdentifier>` is not implemented for `unic_langid_impl::LanguageIdentifier`
|
= note: required because of the requirements on the impl of `std::convert::Into<unic_langid_impl::LanguageIdentifier>` for `unic_langid_impl::LanguageIdentifier`
= note: required by `fluent_bundle::bundle::FluentBundle::<R>::new`
Dart
Rust (RLS)
Elixir LS
Dart
Gitlens
Github pull requests
Material theme
Material icon theme
plantUml
Yaml
for b in $(git fsck --lost-found | grep blob | awk '{print $3}'); do git cat-file -p $b | grep -q ${UNIQUE_CODE} && echo $b; done
@Virviil
Virviil / ste_version.ex
Created November 26, 2017 19:41
Set elixir project's version
def set_version(version) do
Agent.update(Mix.ProjectStack, fn state ->
%{stack: [%{config: config_keyword}]} = state
new_config_keyword = Keyword.put(config_keyword, :version, version)
Map.put(state, :stack, [%{config: new_config_keyword}])
end)
end