Skip to content

Instantly share code, notes, and snippets.

@Ficik
Ficik / gist:5182950
Created March 17, 2013 18:30
w20-2-komunikace
Stateless
=========
< open
> order token not specified
< open my_order
> opened
< add my_order something
> added
< process
> orden token not specified
@Ficik
Ficik / gist:5182942
Created March 17, 2013 18:29
w20-2-statefull
net = require 'net'
server = net.createServer (con) ->
con.setEncoding 'utf8'
items = no
process = (action, value) ->
return "Commands: open, add, process" unless action in ["open", "add", "process"]
if action == "open"
return "order already exists" if items
@Ficik
Ficik / gist:5182937
Created March 17, 2013 18:27
w20-2-stateless
net = require 'net'
DB = {}
server = net.createServer (con) ->
con.setEncoding 'utf8'
process = (action, token, value) ->
return "Commands: open, add, process" unless action in ["open", "add", "process"]
return "order token not specified" unless token
@Ficik
Ficik / gist:5170629
Last active December 15, 2015 00:09
Asyn delete homework
http = require "http"
DB =
pending : []
customer : [
"This is existing entity"
"This is existing entity"
"This is existing entity"
"This is existing entity"
"This is existing entity"
@Ficik
Ficik / gist:4957636
Last active December 13, 2015 18:48
ficik@ficik-desktop:~$ DEBUGGER=gdb steam
Running Steam on ubuntu 12.10 32-bit
STEAM_RUNTIME is disabled by the user
GNU gdb (GDB) 7.5-ubuntu
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".