This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"errors" | |
) | |
type Node struct{ | |
value int | |
left * Node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------ThisIsTheBoundary1234567890 | |
Content-Disposition: form-data; name="source"; filename="image-vaun.png" | |
Content-Type: PNG | |
PNG | |
IHDRUSU3 IDATx^Ô½w°e×uæ·_Î9õëÜ@£ÑÔH$(SV©TcTÉ,ÿ»<å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èïë | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
get '/tick/db' do | |
cleanDB() | |
end | |
post '/bill' do | |
billCustumers() | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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)) |