Skip to content

Instantly share code, notes, and snippets.

View isereb's full-sized avatar
😎
All the way up

Ilya Sereb isereb

😎
All the way up
View GitHub Profile
@ryanfitz
ryanfitz / golang-nuts.go
Created December 2, 2012 22:45
two ways to call a function every 2 seconds
package main
import (
"fmt"
"time"
)
// Suggestions from golang-nuts
// http://play.golang.org/p/Ctg3_AQisl
@julie-is-late
julie-is-late / rsa_loading.go
Created February 21, 2017 23:37
How to load rsa keys in go
package config
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"io/ioutil"
"github.com/CodeCollaborate/Server/utils"
@HelgeG
HelgeG / JsonNodeBinding.java
Created October 17, 2017 08:51
Binding for turning Postgres JSONB columns into Jackson JsonNode and vice versa
package com.sqa.virtuoso.webserver.util;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.sql.Types;
import java.util.Objects;
import com.fasterxml.jackson.databind.JsonNode;
import org.jooq.Binding;
import org.jooq.BindingGetResultSetContext;
@fracasula
fracasula / context_cancel.go
Last active May 19, 2022 20:49
GoLang exiting from multiple go routines with context and wait group
package main
// Here's a simple example to show how to properly terminate multiple go routines by using a context.
// Thanks to the WaitGroup we'll be able to end all go routines gracefully before the main function ends.
import (
"context"
"fmt"
"math/rand"
"os"
@indig0fox
indig0fox / LCDConfigs.cs
Last active September 25, 2024 11:42
Space Engineers Automatic LCDs 2 Templates
// Reg Cockpit (Miner)
@0 AutoLCD
Center <Ores Aboard>
echo
InvListXS {T:*} +ore
@1 AutoLCD
Center <Energy Status>
PowerStored {T:Battery}