Skip to content

Instantly share code, notes, and snippets.

View siscia's full-sized avatar

Simone Mosciatti siscia

View GitHub Profile
package main
import (
"fmt"
"errors"
)
type Node struct{
value int
left * Node
------ThisIsTheBoundary1234567890
Content-Disposition: form-data; name="source"; filename="image-vaun.png"
Content-Type: PNG
‰PNG

IHDRUS‰UŸ3 IDATx^Ô½w°e×uæ·_Î9õëÜ@£ÑÔH$€’‡’(SV©Tc‘TÉ,—ÿ»<å0v©,j¦J®r©ÆÖhä0Jòhþ°MٜQ %Š–(fBÌ ¡»N¯_Î9øû­µ÷9ûÞw_÷ë$A8}ï»áœ}ö^ûÛߊ»nGðwø¸ÙÅWW×CkksØÜÜ4µ©©ÁZË߫롥­5Ì/¯†æÆ¦°¼¼ž}ö›áâŋai~!üÜÏý\8qüˆ}¿.Þc}Õ½¦÷o¥ >õËgC_ogèïë
>>> Simone = myself.MySelf("Simone Mosciatti")
>>> Simone.print_info()
Simone Mosciatti
Born: 9th July 1994
Email: [email protected]
Address: Via Pitteri, 56 Milano Italy
>>> Simone.tool_box()
Love it: Python, Clojure
Know it: C/C++
Learning: Javascript, Haskel, Golang
@siscia
siscia / curriculum.mustache
Last active January 3, 2016 19:59
Source of my curriculum
<!DOCTYPE html>
<html>
<head>
<link href='http://fonts.googleapis.com/css?family=Oxygen+Mono' rel='stylesheet' type='text/css'>
<style>
@media print {
margin: 0 !important; padding: 0 !important; }
body {
font-family: 'Oxygen Mono', sans-serif;
-webkit-print-color-adjust: exact;
@siscia
siscia / tick.py
Last active August 29, 2015 13:56
from flask import Flask
app = Flask(__name__)
@app.route("/clean-up")
def cleanUp():
"Clean the database from the old users"
cleanDatabase()
@app.route("/bill")
def bill():
@siscia
siscia / tick.js
Last active August 29, 2015 13:56
var express = require('express');
app = express();
app.get('/tick/clean-database', function(req, res) {
/*Daily job*/
cleanDatabase()
});
app.post('/tick/bill-custumer', function(req, res) {
/*Monthly job*/
billCustumers()
require 'sinatra'
get '/tick/db' do
cleanDB()
end
post '/bill' do
billCustumers()
end
(defresource get-user
:allowed-methods #{:get}
:available-media-types ["application/json"]
:malformed? (fn [ctx]
(let [q-params (get-in ctx [:request :query-params])]
(if-let [email (get q-params "email")]
[false {:query
{:email email}}]
(if-let [username (get q-params "username")]
[false {:query
@siscia
siscia / e_ale92.sh
Last active August 29, 2015 14:02
per e_ale92
Prendiamo un qualunque repo si github, per esempio questo: https://github.com/milano-js/frontend-tools
Con relativo indirizzo git:
https://github.com/milano-js/frontend-tools.git
Entriamo in una shell:
=======
simo@simo:~$ git clone https://github.com/milano-js/frontend-tools.git
(defn update-world [world room action]
;; if action is something like pick up an object from the room
;; I will return a new world without such object in the room,
;; if, otherwise, you are moving between some room I will return the same
;; world but you will obviously change the room
)
(loop [world {:roomA {} :roomB {}
room :roomA]
(let [[new-world next-room] (update-world world room (get-input))