Skip to content

Instantly share code, notes, and snippets.

@nicnocquee
nicnocquee / trovebox_bug.md
Created November 30, 2014 23:46
Reason why some albums not showing photos in Delightful Trovebox.

The bug where an album doesn't show any photos is related to the bug I reported in frontend photo/frontend#1563

So for example, I requested photos in album 2q, the photos returned don't have album 2q.

<NSMutableURLRequest: 0x7f833609f1c0> { URL: http://nicnocquee.trovebox.com/v2/photos/list.json?page=0&pageSize=20&sortBy=dateUploaded%2Cdesc&returnSizes=320x320%2C640x640&album=2q }
Printing description of responseObject:
<__NSArrayM 0x7f8336132460>(
<Photo: 0x7f833610c9f0> {
    albums =     (
@nicnocquee
nicnocquee / introrx.md
Last active August 29, 2015 14:08 — forked from staltz/introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@nicnocquee
nicnocquee / tardis.css
Created August 30, 2014 00:48
Tardis css. More css drawing here http://a.singlediv.com (not mine)
.entry {
text-align: center;
min-height: 400px;
position: relative;
}
.entry div {
position: absolute;
left: 50%;
top: 50%;
@nicnocquee
nicnocquee / Synology_Witopia.txt
Created August 5, 2014 06:01
Connect to Witopia openvpn from synology diskstation
Anyway, to have Witopia work on a Synology DSM 4 NAS with OpenVPN/SSL one must manually edit the config file within the Synology NAS.
As an outline, we're going to create an OpenVPN connection by editing the config files Synology DSM 4 makes.
Requires:
- Synology NAS with DSM 4
- Witopia account & download the "Raw" files as a ZIP from Witopia's My Dashboard
- SSH enabled on your Synology DSM
If you don't have the above done, this process will not make sense/will not be valid.
@nicnocquee
nicnocquee / flatten_directory.sh
Last active August 29, 2015 14:04
Flatten directory
find /foo -iname '*.txt' -exec cp -p \{\} /dest/ \;
@nicnocquee
nicnocquee / datemodif_to_exif.sh
Created July 21, 2014 01:34
Change date modification to exif date created. Download jhead from http://www.sentex.net/~mwandel/jhead/
jhead -ft *.jpg
@nicnocquee
nicnocquee / dns_servers.txt
Created July 20, 2014 14:25
DNS servers by dns.watch and Google
84.200.69.80
84.200.70.40
8.8.8.8
8.8.4.4
@nicnocquee
nicnocquee / speedup_all_movies_in_directory_ffmpeg.sh
Created June 26, 2014 14:31
Script to speed up (1.3x) all movies in directory using ffmpeg. To speed up 2x, change 10/13 to 0.5 and 1.3 to 2.
find . -name '*.mov' -exec ffmpeg -i {} -filter_complex "[0:v]setpts=10/13*PTS[v];[0:a]atempo=1.3[a]" -map "[v]" -map "[a]" {}@2x.mov \;
@nicnocquee
nicnocquee / speedup_movie_ffmpeg.sh
Created June 26, 2014 14:30
Script to speed up/down movie using ffmpeg. To change speed to 2x, change 10/13 to 0.5 and 1.3 to 2.
ffmpeg -i input_name -filter_complex "[0:v]setpts=10/13*PTS[v];[0:a]atempo=1.3[a]" -map "[v]" -map "[a]" output_name
@nicnocquee
nicnocquee / download_wwdc_14_sd.sh
Created June 26, 2014 09:08
Script to Download WWDC 14 Videos SD
curl https://developer.apple.com/videos/wwdc/2014/ | grep -iIoh '|.*http.*._sd_.*dl=1' | sed -e 's/|.*"//g' | sed -e 's/\?dl=1//g'|xargs -n1 curl --remote-name