- map -> thenApply
- flatMap -> thenCompose
- forEach -> thenAccept
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" | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"github.com/gorilla/mux" | |
) |
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
{"attributes":"\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003c!DOCTYPE ObjectMetadata SYSTEM \"/SysConfig/Classify/FTStories/classify.dtd\"\u003e\u003cObjectMetadata\u003e\n \u003cEditorialDisplayIndexing\u003e\n \u003cDILeadCompanies/\u003e\n \u003cDITemporaryCompanies\u003e\n \u003cDITemporaryCompany\u003e\n \u003cDICoTempCode/\u003e\n \u003cDICoTempDescriptor/\u003e\n \u003cDICoTickerCode/\u003e\n \u003c/DITemporaryCompany\u003e\n \u003c/DITemporaryCompanies\u003e\n \u003cDIFTSEGlobalClassifications/\u003e\n \u003cDIStockExchangeIndices/\u003e\n \u003cDIHotTopics/\u003e\n \u003cDIHeadlineCopy\u003eBarclays shares climb as Exane sees good news in history\u003c/DIHeadlineCopy\u003e\n \u003cDIBylineCopy\u003eBryce Elder\u003c/DIBylineCopy\u003e\n \u003cDIFTNPSections/\u003e\n \n \n \u003cDIFirstParCopy\u003eUK stocks slip to their worst weekly perfo |
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
type SomeResource struct { | |
counter int | |
} | |
func (sr *SomeResource) incCounter(rw http.ResponseWriter, r *http.Request) { | |
sr.counter++ | |
} | |
func (sr *SomeResource) getCounter(rw http.ResponseWriter, r *http.Request) { | |
v := strconv.Itoa(sr.counter) |
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
Source(List("/", "/docs")) | |
.map(theUri => HttpRequest(uri = theUri)) | |
.via(Http().outgoingConnection("akka.io").async) | |
.mapAsyncUnordered(2)(r => r.entity.toStrict(2 seconds)) | |
.map(e => e.data.utf8String) | |
.fold(List[String]())(_ :+ _) | |
.runWith(Sink.head) | |
.onComplete(logger.info("{}", _)) | |
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
'notifications-monitor': | |
'patterns': [ | |
{ | |
'match': '^(tid_.*) ()' | |
'name': 'keyword.tid' | |
} | |
] |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
int main(int argc, char **argv) { | |
printf("Hello from the parent process!\n"); | |
pid_t pid = fork(); | |
if (pid == -1) { | |
perror("fork failed"); | |
exit(-1); |
I hereby claim:
- I am kovacshuni on github.
- I am kovacshuni (https://keybase.io/kovacshuni) on keybase.
- I have a public key whose fingerprint is CD73 1BC4 48A4 3C60 32DB 2194 7266 0A64 2CD1 D6FA
To claim this, I am signing this object:
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
alias fc='fleetctl' | |
alias fclm='fleetctl list-machines' | |
alias fclu='fleetctl list-units' | |
alias fcjf='fleetctl journal -f ' | |
alias fcbad='fleetctl list-units | grep -v "exited\|running\|backup\|upgrade"' | |
function fclmg() { fleetctl list-machines | grep $@ ;} | |
function fclug() { fleetctl list-units | grep $@ ;} | |
function fcssh() { fleetctl ssh $@ ;} | |
function fcjfl() { fleetctl journal -f --lines=$@ ; } |
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
data: [] | |
data: [] | |
data: [] | |
data: [{"apiUrl":"http://api.ft.com/content/7998974a-1e97-11e6-b286-cddde55ca122","id":"http://www.ft.com/thing/7998974a-1e97-11e6-b286-cddde55ca122","type":"http://www.ft.com/thing/ThingChangeType/UPDATE"}] | |
data: [] |