Skip to content

Instantly share code, notes, and snippets.

View wkrsz's full-sized avatar

Wojtek Kruszewski wkrsz

View GitHub Profile
@wkrsz
wkrsz / gist:3d5ff7f908a180b87498
Last active December 11, 2018 07:03
Stop Safari hanging when selecting the address bar or opening a new tab
This shit has been bugging me for too long, so I went on a hunt and found a workaround.
The Symptoms are as follows:
* Clicking the address bar results in a 1-4 second delay
* Opening links in new tabs results in a 1-4 second delay
* +T results in a 1-4 second delay
* `PressAndHold[<pid>]: IMKServer Stall detected` is present in `/var/log/system.log` at the time of the hang.
It appears to be to do with the PressAndHold helper - the thing that shows an IOS style selection of accents when you hold a key down.
The fix may have some unwanted effects, I haven't really noticed any.
@wkrsz
wkrsz / backbone-rivets.config.js
Last active December 18, 2015 04:49 — forked from wulftone/backbone-rivets.config.js
Some funky syntax for Rivets: model.@Attribute, model.attribute, model.computed().
// Bind to backbone attribute (read/write with get/set, subscribe to change:attribute event):
// data-text="model.@attribute"
//
// Bind to output of function (calls the function to get value, subscribes to 'change' event):
// data-text="model.computedProperty()
//
// Bind to attribute (subscribes to 'change' event):
// data-text="model.attr"
(function(rivets){
@wkrsz
wkrsz / README.md
Created May 3, 2012 13:43 — forked from dsokolowski/README.md
Integration capybara with minitest

##Integration capybara with minitest

Requirements:

  • ruby 1.9
  • gem capybara

All you have to do is to require file test_helper.rb at the beginning of your test files.