Skip to content

Instantly share code, notes, and snippets.

View bananu7's full-sized avatar
🏍️

Bartek Banachewicz bananu7

🏍️
View GitHub Profile
template<typename T>
auto accumulate(T const& xs,
typename std::iterator_traits<decltype(begin(xs))>::value_type const& v)
-> decltype(std::plus<typename std::iterator_traits<decltype(begin(xs))>::value_type>(*std::begin(xs), *std::begin(xs)))
{
return std::accumulate(std::begin(xs), std::end(xs), v);
}
template<typename T, typename F>
auto accumulate(T const& xs,
@bananu7
bananu7 / a.hs
Created September 1, 2014 16:29 — forked from mikusp/a.hs
{-# LANGUAGE MagicHash, RecordWildCards #-}
import qualified Data.Map as Map
import Data.List
import Data.Maybe
main = print $ recognize chords [F#,B,D#,A,E]
{-- types --}
type Interval = Int
@bananu7
bananu7 / print.c++
Created August 8, 2014 10:34
Variadic print
#include <iostream>
#include <string>
#include <vector>
template<typename T>
void print(T const& t) {
std::cout << t << " ";
}
void print(std::string const& s) {
@bananu7
bananu7 / PS1.sh
Last active August 29, 2015 14:05
# use if you don't have git bash completion
#alias __git_ps1="git branch 2>/dev/null | grep '*' | sed 's/* \(.*\)/(\1)/'"
PS_USER_MACHINE='\u@\h'
PS_DIRECTORY='\w'
PS_BLACK="\[\033[30m\]"
PS_RED="\[\033[31m\]"
PS_GREEN="\[\033[32m\]"
PS_YELLOW="\[\033[33m\]"
PS_BLUE="\[\033[34m\]"
// Learn more about F# at http://fsharp.net
// See the 'F# Tutorial' project for more help.
open System.Linq
open System.Collections.Generic
open System
type Card =
| Guard

// Mah personal contact data

I do object-orientated software engineering in C++ on Windows with Visual Studio. Medical trouble from 1/2011 till 5/2014.

Personal projects:

  • I have authored some proposals to the C++ Standards Committee, aiming to improve the language for all users. I attended the latest meeting in Bristol in April 2013.
  • I have authored my own language with some unique C++ interoperation aspects.
  • Authored a number of C++ tutorials.

Achievements:

<!doctype html>
<html>
<head>
<title>Blocks Proof of Concept</title>
<style type="text/css">
div.block {
background-color: #36C;
min-width: 200px;
height: 100px;
@bananu7
bananu7 / tesselation.cpp
Created March 21, 2014 16:40
My Little Tesselation
#include <glload/gl_4_0.hpp>
#include <glload/gl_load.hpp>
#include <GLFW/glfw3.h>
#include <string>
#include <vector>
#include <iostream>
#define NL "\n"
@bananu7
bananu7 / labpki.sh
Last active August 29, 2015 13:57
Polecenia lab PKI
#####################
# Hasla:
# CA : cakey
# klient : klientkey
# paczka : lab142
#####################
#############################
# RECZNE ZMIANY W KONFIGU
#
@bananu7
bananu7 / Game_Themes.js
Created February 27, 2014 15:38
Game themes collection to be used in jams
//random game jam theme generator
var LudumDareThemeList = [
"2030: The Year We Make Contact",
"3D Glasses",
"8 Eyes",
"A (very) non-addictive game",
"A day in the life of",
"Aardvarks",
"Abandoned",
"Absolute",