Skip to content

Instantly share code, notes, and snippets.

View Azimboy's full-sized avatar
🏠
Working from home

Azimboy Azimboy

🏠
Working from home
View GitHub Profile
@Azimboy
Azimboy / figures.py
Last active April 7, 2020 01:04
Chess figures
class BadStep(Exception):
pass
class WrongArgument(Exception):
pass
class Figure:
def __init__(self, coord):
self.__coord = (ord(coord[0]) - 64, int(coord[1]))
def next_step(self, dest):
@Azimboy
Azimboy / Receipts.scala
Created December 7, 2019 08:52
Calculator for receipts
import java.io.InputStream
import scala.io.Source
object Receipts {
case class Receipt(id: Int, payer: String, paid: Double, separatePaids: Seq[(String, Double)])
case class Cost(total: Double = 0.0, mutual: Double = 0.0, separate: Double = 0.0)
val Consumers = Map(
@Azimboy
Azimboy / archiveDesktopFiles.scala
Created May 28, 2018 10:08 — forked from sroebuck/archiveDesktopFiles.scala
Running Scala shell scripts with library dependencies
#!/bin/sh
exec /Users/sroebuck/local/bin/scalas $0 $@
!#
/***
libraryDependencies ++= Seq(
"com.github.scala-incubator.io" %% "scala-io-file" % "0.2.0",
"joda-time" % "joda-time" % "2.0",
"org.joda" % "joda-convert" % "1.1"
)
*/
@Azimboy
Azimboy / ansible-summary.md
Created May 23, 2018 04:09 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of