Skip to content

Instantly share code, notes, and snippets.

View mytrile's full-sized avatar

Dimitar Kostov mytrile

View GitHub Profile
@mytrile
mytrile / gist:150c2d715c31d9562caf
Created September 23, 2015 08:00 — forked from afn/gist:c04ccfe71d648763b306
Restart phantomjs when it hangs
# Borrowed from https://github.com/y310/rspec-retry/blob/master/lib/rspec/retry.rb
CAPYBARA_TIMEOUT_RETRIES = 3
RSpec.configure do |config|
config.around(:each, type: :feature) do |ex|
example = RSpec.current_example
CAPYBARA_TIMEOUT_RETRIES.times do |i|
example.instance_variable_set('@exception', nil)
self.instance_variable_set('@__memoized', nil) # clear let variables
@mytrile
mytrile / example
Last active August 29, 2015 14:25 — forked from koreno/README.md
'rebaser' improves on 'git rebase -i' by adding information per commit regarding which files it touched.
pick d0d13d0 1:removed some bullshit from __entrypoint.d _________9______
pick a44e878 2:Improvements to object.d and __entrypoint.d ________89______
pick 12c5b47 3:Add usage to build.d ___3____________
pick 318af43 4:Added .gitignore ______________e_
pick eb9ad0f 5:Attempting to add more array support _1_3_56_89abcd__
pick 8b8df05 6:Added some special support for ldc to object.d ________8_______
pick e630300 7:Removed imports from build ___3____________
pick 69ae673 8:c-main to d-main __2345_7_9______
pick c00b344 9:Implemented write an exit system calls _1_345678_______
pick 3901cca 10:Add wscript_build file 0__3____________

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
PS D:\rust\demo> cargo build -v
An unknown error occurred
Process didn't exit successfully: `rustc -v verbose` (status=101)
--- stderr
error: couldn't read verbose: IoError { kind: FileNotFound, desc: "couldn\'t open path as file", detail: Some("
found (OS Error 2: The system cannot find the file specified.\r\n); path=verbose; mode=open; access=read") }
@mytrile
mytrile / 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.

Unchecked dependencies for environment dev:
* postgrex (package)
the dependency postgrex defined
> In mix.exs:
{:postgrex, nil, [hex_app: :postgrex, optional: true]}
does not match the requirement specified
> In deps/sugar/mix.exs:
// setup geolocation purpose and accuracy
Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_BEST;
Ti.Geolocation.purpose = L('geo-purpose');
// setup map and poi's annotation
var latitude = 48.847684,
longitude = 2.35165;
var annotation = Titanium.Map.createAnnotation({
animate: true,
// controller
var args = arguments[0] || {};

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.