Skip to content

Instantly share code, notes, and snippets.

@arsssen
arsssen / umbrella-0.1.0.tgz
Last active November 2, 2021 13:51
Helm umbrella chart
@arsssen
arsssen / validation.go
Created May 3, 2018 16:42
example of using JSON configuration for "github.com/asaskevich/govalidator"
package main
import (
"encoding/json"
"fmt"
"github.com/asaskevich/govalidator"
)
func main() {
@arsssen
arsssen / python_hash.js
Created December 26, 2017 11:51
Implementation of Pythons's "hash" function in JS
function PythonHash(s) {
var x = s.charCodeAt(0) << 7,
len = s.length;
for (var i=0; i < len; i++) {
x = (1000003 * x) ^ s.charCodeAt(i)
}
x = x ^ len
if (x == -1) {
x = -2