Skip to content

Instantly share code, notes, and snippets.

View tomekzaw's full-sized avatar

Tomek Zawadzki tomekzaw

View GitHub Profile
public Observable<Photo> searchForPhotos(String searchQuery) {
return Observable.fromCallable(() -> downloadUrlSource(searchQuery))
.flatMap(googleSiteSource -> Observable.fromArray(extractPhotoUrls(googleSiteSource).toArray(new String[0])))
.map(photoUrl -> {
try {
return getPhoto(photoUrl);
} catch (IOException e) {
log.log(Level.WARNING, "Could not download a photo", e);
}
return null; // ???!!!
@aras-p
aras-p / preprocessor_fun.h
Last active July 16, 2024 02:50
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">