Skip to content

Instantly share code, notes, and snippets.

Vladimir Bauer vbauerster

Block or report user

Report or block vbauerster

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
use rand::Rng;
use std::cmp::Ordering;
use std::io;
fn main() {
println!("Set your secret (1-100):");
let mut secret = String::new();
.read_line(&mut secret)
.expect("Failed to read line");
vbauerster /
Last active Mar 2, 2019
go sync package benchmarks: mbp 2013 vs mbp 2017

Benchmarks done with go 1.12 version.

mbp 2017 results

  • CPU: Intel Core i7-7820HQ @ 2.90GHz
  • RAM: 16 GB 2133 MHz LPDDR3
goos: darwin
goarch: amd64
pkg: sync
BenchmarkCond1-8                   	10000000	       236 ns/op	       0 B/op	       0 allocs/op
View vscode.rc
"vim.leader": "<space>",
"vim.easymotion": true,
"vim.neovimPath": "/usr/local/bin/nvim",
"vim.enableNeovim": true,
"vim.insertModeKeyBindings": [
"before": [",", "."],
"after": ["<Esc>"]
View cVim.rc
let mapleader = " "
"set showtabindices
"set smoothscroll
map g{ previousTab
map g} nextTab
" Code blocks (see below for more info)
getIP() -> {{
httpRequest({url: '', json: true},
function(res) { Status.setMessage('IP: ' + res.ip); });
View wasavi.rc
" exrc for wasavi
set tabstop=4
set number
set jkdenotative
set cursorline
set cursorcolumn
set theme=solarized
" map! is insert mode
map! ,. <esc>
vbauerster / .vimrc
Created Sep 11, 2017 — forked from diyan/.vimrc
Alexey Diyan's vim configuration file
View .vimrc
" This must be first, because it changes other options as a side effect.
set nocompatible
" On Windows use '.vim' instead of 'vimfiles' to make sync easier
let s:ms_win = (has('win16') || has('win32') || has('win64'))
if s:ms_win
set runtimepath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/.vim/after
set shell=/bin/sh

Keybase proof

I hereby claim:

  • I am vbauerster on github.
  • I am vbauerster ( on keybase.
  • I have a public key ASB3b2WsmEzM0zEf5anFdzxVWDr9H54XJK0hOntQZP7v_go

To claim this, I am signing this object:

View mirroredQuery.go
package main
import (
func main() {
responses := make(chan string, 3)
View main.go
Exercise: Loops and Functions
As a simple way to play with functions and loops, implement the square root
function using Newton's method.
In this case, Newton's method is to approximate Sqrt(x) by picking a starting
point z and then repeating: z - (z*z-x)/(2*z)
Original formula:
View main.go
package main
import (
func main() {
inch := make(chan int)
outch := make(chan int)
You can’t perform that action at this time.