Skip to content

Instantly share code, notes, and snippets.

View mdallastella's full-sized avatar

Marco Dalla Stella mdallastella

View GitHub Profile
@mdallastella
mdallastella / instances.txt
Last active August 4, 2020 07:56
Instances no longer active (2020/08)
0mph.de
0x2a.club
0xd.0xa.pw
10x.sh
2.distsn.org
2hu.club
3.14r8.club
3.distsn.org
42pix.pl
4toot.org

Keybase proof

I hereby claim:

To claim this, I am signing this object:

Keybase proof

I hereby claim:

To claim this, I am signing this object:

(ns talking-clock
(:require [clojure.string :as str]
[clojure.pprint :refer [cl-format]]))
(defn- ->word
[n]
(cl-format nil "~r" n))
(defn- time-to-map
[time]

Keybase proof

I hereby claim:

  • I am mdallastella on github.
  • I am mdallastella (https://keybase.io/mdallastella) on keybase.
  • I have a public key ASAGZJGQi-7QXNsY88a0TP7oMa6zU0z1fMwsN_jsf0mxhwo

To claim this, I am signing this object:

(ns tic-tac-toe)
;; Calculate the columns indexes
(defn columns-indexes
[side]
(let [size (* side side)]
(reduce
(fn [m n]
(conj m
(take side (range n size side))))
(ns sessions)
(defn create-sessions
"Initialize the session atom."
[]
(atom []))
(defn put-session!
"Insert a session into the sessions atom."
[sessions session]
@mdallastella
mdallastella / socket-spec1.clj
Last active July 7, 2017 09:27
Write to a DataOutputStream whit a message specification
(import '[java.io DataOutputStream ByteArrayOutputStream])
(defn write-int [out v]
(.writeInt out v))
(defn write-string [out s]
(let [b (.getBytes s)
l (count s)]
(write-int out l)
(.write out b 0 l)))
@mdallastella
mdallastella / simple_die.clj
Created July 4, 2016 09:51
Simple die parser
(ns die-parser.example
(:require [instaparse.core :as i]))
(def roller-grammar
"die = times <'d'> faces
times = number
faces = number
<number> = #'[0-9]+'")
(defn roll
@mdallastella
mdallastella / README.md
Created February 12, 2016 11:09 — forked from magnetikonline/README.md
Reset Windows 2012R2 local administrator password.

Reset Windows 2012R2 local administrator password

  • Boot from Microsoft Windows Server 2012R2 DVD/ISO.
  • From the Windows Setup menu, click "Next".
  • Select "Repair your computer".
  • Click on "Troubleshoot".
  • Under Advanced options, click "Command Prompt".

At the command prompt, run the following commands: