Skip to content

Instantly share code, notes, and snippets.

Bastian Krol basti1302

Block or report user

Report or block basti1302

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
@basti1302
basti1302 / keybase.md
Created Jul 24, 2018
Verifying myself
View keybase.md

Keybase proof

I hereby claim:

  • I am basti1302 on github.
  • I am basti1302 (https://keybase.io/basti1302) on keybase.
  • I have a public key ASBijUw927CXoPXFpcWt9FmaJAA-gHurdMeZf9l23Bj2eAo

To claim this, I am signing this object:

@basti1302
basti1302 / 01 readme.markdown
Last active Dec 10, 2017
Custom combinator which accesses the Auth Context
View 01 readme.markdown
@basti1302
basti1302 / Util.Migration.hs
Created Oct 27, 2016
Use jtdaugherty/dbmigrations to upgrade the DB at app startup
View Util.Migration.hs
{-# LANGUAGE ScopedTypeVariables #-}
module Util.Migration (upgradeDatabase) where
import qualified Util.Config as Config
import Control.Monad (forM_)
import Database.Schema.Migrations
import Database.Schema.Migrations.Backend
import Database.Schema.Migrations.Filesystem (FilesystemStoreSettings (..),
View dbmigrations-1.1.1-dbmigrations-tests.log
Test suite dbmigrations-tests: RUNNING...
### Failure in: 1:MySQL backend tests
test/BackendTest.hs:120
Installed migrations
expected: ["root"]
but got: ["root","second"]
Cases: 80 Tried: 80 Errors: 0 Failures: 1
Migration created successfully: "first"
Migration created successfully: "first"
Migration created successfully: "second"
@basti1302
basti1302 / Main.elm
Last active Oct 23, 2015
Runtime error in Elm due to shadowing
View Main.elm
import Html
type alias Model = { a : String }
one = { a = "1" }
two = { a = "2" }
getNext : Model -> Model
getNext current =
let
@basti1302
basti1302 / random-signal.elm
Created Aug 19, 2015
Creating a steady timed signal from random and feeding it into HTML output
View random-signal.elm
import Html exposing (..)
import Random
import Random exposing (Seed)
import Signal exposing (Signal, (<~), (~))
import Time exposing (every, second)
randomFloat : Seed -> Float
randomFloat seed = seed |> (Random.generate <| Random.float 0 1) |> fst
randomBool : Seed -> Bool
View go-lang-lab.markdown

Go Lab

Just some random things one could try to get acquainted with Go... only to be used if you lack the creativity to come up with your own ideas ;-)

Set up your environment

  1. Install Go
  2. Maybe configure your preferred text editor for Go
@basti1302
basti1302 / pyramid.js
Created Oct 26, 2013
Compare the consumption of a Hypermedia API with and without Traverson
View pyramid.js
'use strict';
var request = require('request')
var traverson = require('./traverson')
var rootUri = 'https://api.github.com/'
// optional: raises the rate limit of the GitHub API from 60 requests to 5000 requests per hour
var ghUser = 'basti1302',
ghPass = '...'
@basti1302
basti1302 / optional.feature
Created Aug 22, 2013
Use an optional parameter in Cucumber
View optional.feature
Feature: Optional parameter
Scenario: Use an optional parameter
When I execute a step
When I execute a step with the optional parameter whatever
@basti1302
basti1302 / install_ruby_cucumber_phantomjs_windows.markdown
Last active Dec 20, 2015
install_ruby_cucumber_phantomjs_debian.markdown
View install_ruby_cucumber_phantomjs_windows.markdown
You can’t perform that action at this time.