- Josh Goebel (@yyyc514): suggested lazy evaluation on
set
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
macOS 10.12.1 (Build 16B2659) | |
https://browser.geekbench.com/v4/compute/295179 | |
https://browser.geekbench.com/v4/compute/295180 | |
https://browser.geekbench.com/v4/compute/295182 | |
https://browser.geekbench.com/v4/compute/295185 | |
https://browser.geekbench.com/v4/compute/295187 | |
macOS 10.12.2 (Build 16C63a) | |
https://browser.geekbench.com/v4/compute/295151 | |
https://browser.geekbench.com/v4/compute/295161 |
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
class EphemeralToken | |
attr_reader :origin, :targets, :expires_at, :payload | |
class TokenInvalid < StandardError; end | |
class TokenExpired < TokenInvalid; end | |
Algorithm = 'HS512' | |
Secret = ENV['SECRET_EPHEMERAL_TOKEN_KEY'] | |
ObjectToNotation = -> (target) { [target.class.model_name.name, target.id] } | |
NotationToObject = -> ((model_name, model_id)) { model_name.constantize.find_by_id(model_id) } |
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
core@deis-1 ~ $ fleetctl journal -f deis-builder@1.service | |
-- Logs begin at Wed 2014-10-08 14:11:41 UTC. -- | |
Oct 10 15:03:08 deis-3 sh[30201]: [50cca74e] -job image_get(2f651070bd84650340ba1210ef10a8957c74c9dc32d39ff3bf4625cbc355ca1b) = ERR (1) | |
Oct 10 15:03:08 deis-3 sh[30201]: [50cca74e] +job image_get(fb8e2f5f8a6c25dcafe9d8a79ca35471a3a4251690581756fdad117046b199a4) | |
Oct 10 15:03:08 deis-3 sh[30201]: No such id: fb8e2f5f8a6c25dcafe9d8a79ca35471a3a4251690581756fdad117046b199a4 | |
Oct 10 15:03:08 deis-3 sh[30201]: [50cca74e] -job image_get(fb8e2f5f8a6c25dcafe9d8a79ca35471a3a4251690581756fdad117046b199a4) = ERR (1) | |
Oct 10 15:03:08 deis-3 sh[30201]: [50cca74e] +job image_get(4fc3518d6f3593906bb563241420abc018cfbfd705fe6528d3b22580bc625a49) | |
Oct 10 15:03:08 deis-3 sh[30201]: No such id: 4fc3518d6f3593906bb563241420abc018cfbfd705fe6528d3b22580bc625a49 | |
Oct 10 15:03:08 deis-3 sh[30201]: [50cca74e] -job image_get(4fc3518d6f3593906bb563241420abc018cfbfd705fe6528d3b22580bc625a49) = ERR (1) | |
Oct 10 15:03:08 deis-3 sh[30201]: |
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
# config/initializers/sidekiq.rb | |
require 'sidekiq' | |
Sidekiq.configure_client do |config| | |
config.redis = { | |
:url => ENV['SIDEKIQ_REDIS_URI'], | |
:namespace => ENV['SIDEKIQ_NAMESPACE'], | |
:size => ENV['SIDEKIQ_CLIENT_SIZE'] || 5 | |
} |
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
@implementation RAEditorView | |
- (instancetype) initWithCoder:(NSCoder *)aDecoder { | |
self = [super initWithCoder:aDecoder]; | |
if (self) { | |
[self setup]; | |
} | |
return self; | |
} |
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
var something = function () { | |
alert("something destructive."); | |
} | |
((function(){ | |
alert("do it now. :D"); | |
})()); | |
// Function declaration for `something` is underhanded. | |
// It has no terminating semicolon, so the immediately evaluated expression, |
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
// Download all assets from https://developer.apple.com/wwdc/videos | |
// Warning: might take up a lot of disk space | |
NodeList.prototype.toArray = function () { | |
return Array.prototype.slice.call(this); | |
}; | |
[].concat.apply([], document.querySelectorAll("li.session").toArray().map(function(session){ | |
var sessionID = session.id.match(/^\d+/)[0]; | |
var title = session.querySelector(".title").innerText; |
- Dell (4268) = 0x40ac
- U3011 (16485) = 0x4065: /System/Library/Displays/Overrides/DisplayVendorID-10ac/DisplayProductID-4065
- U2713HM (16512) = 0x4080: /System/Library/Displays/Overrides/DisplayVendorID-10ac/DisplayProductID-4080
Credit: http://embdev.net/topic/284710; works for OS X 10.8 & last tested on 10.9 13A476u.
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
Open Source Is Not A Warzone. Not Every Man Is A Dick. | |
We are women of tech. We do Open Source. We are part of Open Source | |
communities. | |
We attend tech conferences, usergroups and hackathons along with our | |
fellow male developers. | |
And we like it. |