Skip to content

Instantly share code, notes, and snippets.

View aterga's full-sized avatar
🎯
Focusing

Arshavir Ter-Gabrielyan aterga

🎯
Focusing
View GitHub Profile
@aterga
aterga / split_2d.cpp
Created September 18, 2012 13:50
Simple 2d array split method
void GameOfLife::split()
{
// Strategy:
n_x_nodes_ = n_nodes_;
n_y_nodes_ = 1;
int workload_per_node = 0;
int zero_node_workload = 0;
int n_actual_nodes = n_nodes_;
@aterga
aterga / univup.tcl
Created April 11, 2013 07:25
This is the bitbucket2masterhost.ru site updater called univup.exp!
#!/opt/local/bin/expect -f
################################
# Hello,
# this
# is
# the
# bitbucket2masterhost.ru
# site
# updater
# called
@traviskaufman
traviskaufman / logback_disable_in_unit_tests.md
Last active March 20, 2023 08:38
Logback: Disable all logging in unit tests

After scouring the internet and piece-mealing together the correct way to do this, here is a step-by-step, all-in-one-place guide to making logback STFU when running your unit tests.

Here's how to do it

Save the following as logback-test.xml under src/test/resources:

<configuration>
  <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
    <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
      <pattern>%msg%n</pattern>
@aterga
aterga / sv_boogie.bpl
Last active November 21, 2015 00:28
Verifying QuickSort in Boogie
const N: int;
axiom 1 < N;
var a: [int]int;
var perm: [int]int;
procedure __new_perm__() returns (perm: [int]int)
ensures perm_ok(perm);
ensures (forall k: int :: 0 <= k && k < N ==> perm[k] == k);
{
var n: int; n := 0;
@aterga
aterga / phd.tex
Created March 29, 2020 18:28
The universal PhD thesis template you were looking for. Open sourced for the first time.
%Insert your settings above
%Insert your text below