Skip to content

Instantly share code, notes, and snippets.

View evadne's full-sized avatar
🎣
gone fishing

Evadne Wu evadne

🎣
gone fishing
View GitHub Profile
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
@evadne
evadne / 0_CONTRIBUTORS.md
Last active July 14, 2023 12:52
RVM + MRI + Capistrano + Puma + Sidekiq
  • Josh Goebel (@yyyc514): suggested lazy evaluation on set
@evadne
evadne / ephemeral_token.rb
Created July 23, 2015 07:51
Ephemeral Secure Token with JWT
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) }
@evadne
evadne / journal
Last active August 29, 2015 14:07
$ fleetctl journal -f deis-builder@1.service
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]:
@evadne
evadne / sidekiq.rb
Created April 28, 2014 04:03
Starter Sidekiq Configuration
# 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
}
@evadne
evadne / RAEditorView.m
Created January 6, 2014 19:47
Hide UIWebView Keyboard Bar
@implementation RAEditorView
- (instancetype) initWithCoder:(NSCoder *)aDecoder {
self = [super initWithCoder:aDecoder];
if (self) {
[self setup];
}
return self;
}
@evadne
evadne / hax.js
Created July 15, 2013 01:21
Semicolon Jeopardy
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,
@evadne
evadne / gist:5794585
Last active April 18, 2023 18:01
WWDC 2013 Videos / Slides (PDF) Downloader — run in a JavaScript console / interpreter hooked to the videos page
// 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;
@evadne
evadne / About.md
Last active April 9, 2024 07:19
Create display override file to force Mac OS X to use RGB mode for Display.

Create display override file to force Mac OS X to use RGB mode for Display.

  • 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.

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.