Skip to content

Instantly share code, notes, and snippets.

View aLekSer's full-sized avatar
🏯
Building

Alexander Apalikov aLekSer

🏯
Building
View GitHub Profile
@aLekSer
aLekSer / falsehoods-programming-time-list.md
Created February 29, 2024 16:37 — forked from timvisee/falsehoods-programming-time-list.md
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@aLekSer
aLekSer / A statistics of test failures on Mac
Created January 22, 2021 19:06
Some failures on `make test`
Add increment of openslots after player finished or on transition
2021/01/22 21:52:01 Tickets [id:"1"] 2021 +0300
--- FAIL: TestHandleBackfills (0.00s) ions(+), 4 deletions(-)
--- FAIL: TestHandleBackfills/returns_a_match_with_open_slots_decreased (0.00s) 60 open-match % git push -f leks
matchfunction_test.go:58: ne.
Error Trace: matchfunction_test.go:58 21), done.
Error: Not equ
@aLekSer
aLekSer / tasks.json
Created December 10, 2020 00:41
Tasks json variation for VS Code Golang. TODO: fix, file position for tests problem matcher.
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "lint",
"type": "shell",
"command": "make lint",
"problemMatcher": [
--- TicketCache.go
+++ BackfillCache.go
@@ -1,39 +1,19 @@
-/////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////
-
-// ticketCache unifies concurrent requests into a single cache update, and
+// cache unifies concurrent requests into a single cache update, and
// gives a safe view into that map cache.
@aLekSer
aLekSer / Backfill flow diagram.mmd
Last active October 22, 2020 19:38
Backfill flow diagram.mmd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aLekSer
aLekSer / list_gameserver.py
Created August 25, 2020 18:43
Example of using Python library to list Agones GameServers
from pprint import pprint
from kubernetes import client, config
import kubernetes.client
from kubernetes.client.rest import ApiException
def main():
print("Hi")
config.load_kube_config()
for api in client.ApisApi().get_api_versions().groups:
@aLekSer
aLekSer / client-server.go
Created August 4, 2020 19:40
Reproducing an error with an absent `RootCAs` parameter
// client/client.go
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io/ioutil"
"log"
@aLekSer
aLekSer / agones_crd_api_reference2.html
Created July 15, 2020 11:39
site/content/en/docs/Reference/agones_crd_api_reference2.html
+++
title="Agones Kubernetes API"
description="Detailed list of Agones Custom Resource Definitions available"
+++
{{% feature expiryVersion="1.8.0" %}}
<p>Packages:</p>
<ul>
<li>
<a href="#agones.dev%2fv1">agones.dev/v1</a>
@aLekSer
aLekSer / example-mako-stub.go
Created June 10, 2020 14:47
Simple example of the mako stub usage
package main
import (
"context"
"flag"
"fmt"
"time"
"github.com/gogo/protobuf/proto"
"github.com/google/mako/go/quickstore"
apiVersion: v1
kind: Pod
metadata:
annotations:
agones.dev/container: simple-udp
agones.dev/sdk-version: 1.5.0
cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
kubernetes.io/limit-ranger: 'LimitRanger plugin set: cpu request for container
simple-udp'
creationTimestamp: "2020-05-14T16:55:41Z"