Skip to content

Instantly share code, notes, and snippets.

View bugarela's full-sized avatar
:octocat:
Excited about too many things

Gabriela Moreira bugarela

:octocat:
Excited about too many things
View GitHub Profile
window#main-window {
/* *******************************************************************
You can tweak the major colors here, the names should
be self explanatory. If you want you can also import the stylesheet
generated by pywal and pass the variables from that stylesheet on to
--color-* vars.
*/
--nice-pink: #cc759d;
--faded-pink: #b898a7;
open class Shape{
class Circle(val radius: Float) : Shape()
class Rect(val base: Float, val height: Float) : Shape()
fun area() : Float{
return when(this){
is Shape.Circle -> 2.0f * 3.14f * this.radius
is Shape.Rect -> this.base * this.height
else -> 0.0f
}
// Compile with koltinc Either.kt
// Run with kotlin EitherKt
open class Either<A,B>{
class Left<A, B>(val left: A) : Either<A,B>()
class Right<A, B>(val right: B) : Either<A,B>()
}
fun safeDiv(x:Int, y:Int) : Either<Unit, Int>{
if (y == 0) return Either.Left(Unit)
import Test.HUnit
data NaturalNote = C | D | E | F | G | A | B deriving (Show, Eq, Enum)
data Note = Natural NaturalNote | Sharp NaturalNote | Flat NaturalNote deriving (Show, Eq)
data Interval = Half | Whole
type Jump = [Interval]
notes = cycle [Natural C,
Sharp C,
@bugarela
bugarela / .zshrc
Last active December 12, 2018 22:00
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/root/.oh-my-zsh"
#GEOMETRY_PROMPT_PLUGINS=(virtualenv exec_time git hg)
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
This file has been truncated, but you can view the full file.
[2017-12-10 23:36:41.600] - HMM.exe --crashHandler=Legacy -silent-crashes --guid=ccf5bfb5-5482-499d-a42c-d3406c8f59bb
[2017-12-10 23:36:41.600] - Device Init
[2017-12-10 23:36:43.708] - [DEBUG] {default} Loaded config from:C:/Program Files (x86)/Steam/steamapps/common/Heavy Metal Machines/HMM_Data\../default.config
[2017-12-10 23:36:43.708] - [DEBUG] {default} Swordfish URL: @=http://lb.heavymetalmachines.com/hmmLive/Swordfish/SwordfishService/
[2017-12-10 23:36:45.175] - [DEBUG] {SwordfishConnection} Language:pt GameVersion:branch.0.0.0.163 Swordfish URL=http://lb.heavymetalmachines.com/hmmLive/Swordfish/SwordfishService/ PID=10528
[2017-12-10 23:36:45.182] - [STATS] {SwordfishLog} Type=SessionStart Perm=False Msg="GameSessionId=ccf5bfb5-5482-499d-a42c-d3406c8f59bb InstallationId=0d5d426b-d3b7-486b-b9d0-60f8c174db29" ShouldFlush:True
[2017-12-10 23:36:45.198] - [DEBUG] {AutoTest} OnEnable
[2017-12-10 23:36:45.205] - [DEBUG] {RegionController} OnEnable
[2017-12-10 23:36:45.224] - [DEBUG] {ControlOptions} Unlo