Skip to content

Instantly share code, notes, and snippets.

View kernel-memory-dump's full-sized avatar
💼
Software Architecture is Love, Software Architecture is Life

Sebastian Novak kernel-memory-dump

💼
Software Architecture is Love, Software Architecture is Life
View GitHub Profile
public static Map<String, String> extractujParametreIzZahteva(String resource) {
Map<String, String> parametri = new HashMap<String, String>();
String operacija = parametri.get("operacija");
if(resource.contains("operacija")) {
// index.hmtl?ime=&prezime=&email=&grad=NS&kredit=&operacija=dodaj
String[] parts = resource.split("\\?");
// fetch the other part ime=x&prezime=&email=&grad=NS&kredit=&operacija=dodaj
String params = parts[1];
String[] paramParts = params.split("&");
// ["ime=pera", "prezime=peric" ]
@kernel-memory-dump
kernel-memory-dump / curltest.c
Created March 14, 2017 13:27 — forked from aaronhurt/curltest.c
example code using libcurl and json-c to post and parse a return from http://jsonplaceholder.typicode.com
/**
* example C code using libcurl and json-c
* to post and return a payload using
* http://jsonplaceholder.typicode.com
*
* Requirements:
*
* json-c - https://github.com/json-c/json-c
* libcurl - http://curl.haxx.se/libcurl/c
*