Skip to content

Instantly share code, notes, and snippets.

@suhr
suhr / proofs.md
Last active December 8, 2022 13:05

Упражнения по формальным доказательствам

Нет времени объяснять, переходим сразу к делу.

Инструменты

Доказывать теоремы мы будем, используя интерактивные пруверы Isabelle или Lean 3. Примеры приводятся для каждого прувера, для решения задач же можно использовать любой из них.

@bmaupin
bmaupin / free-backend-hosting.md
Last active June 27, 2024 09:25
Free backend hosting

Squashing commits on a feature branch

Suppose you did 3 commits on a feature branch called feature:

ae1a4a5 Foo
a5827db Bar
62d4c80 Baz

Make sure develop branch is up to date:

std::vector<std::string> split(std::string text,std::string delim )
{
int index = 0, current = 0;
std::vector<std::string> strs;
while ((index = text.find_first_of(delim, current)) != std::string::npos)
{
strs.push_back(text.substr(current, index - current));
current = index + 1;
}
@yurydelendik
yurydelendik / !wasmllvm.md
Last active May 31, 2024 06:31
Using WebAssembly in LLVM

NOTE: the content is out-of-date. All development is moved to the https://github.com/yurydelendik/wasmception

Using WebAssembly in LLVM

Compiling

# locations, e.g.
export WORKDIR=~/llvmwasm; mkdir -p $WORKDIR
export INSTALLDIR=$WORKDIR
@esimov
esimov / factorial.go
Last active June 11, 2023 21:19
Factorial calculation in Go lang using three different methods: first traditionally, second with closure and third using memoization. The last method is the fastest between the three.
package main
import (
"fmt"
"time"
)
const LIM = 41
var facts [LIM]uint64
@nisaacson
nisaacson / .tern-project
Created February 26, 2014 17:23
Use tern with vim for node.js development.
{
"libs": [
"browser",
"underscore",
"jquery"
],
"plugins": {
"node": {}
}
}
@fatih
fatih / set.go
Created August 11, 2013 21:05
Concurrent safe SET data structure in Go (Golang)
// A very simple example about how to use concurrent-safe SETs (using string as keys) in GO
package main
import (
"fmt"
"sync"
)
type Set struct {
m map[string]bool