- Open Quicktime
- File > New Movie Recording
- View > Float on Top
- Resize and reposition camera view over slide as desired
- File > New Screen Recording
- From "record" button drop-down, ensure microphone is enabled
- Press record button
- Drag
- Start recording
- Advance slides as necessary
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
# Implements the algorithm used by the National Resident Matching Program | |
# (NRMP) to match residency and fellowship applicants to programs. The | |
# algorithm is described here: | |
# http://www.nrmp.org/fellow/algorithm.html | |
# and again here: | |
# http://www.nrmp.org/res_match/about_res/algorithms.html | |
# | |
# The Test class computes the example match scenario described on those pages. | |
module Match |
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 collectionNames = db.getCollectionNames(), stats = []; | |
collectionNames.forEach(function (n) { stats.push(db[n].stats()); }); | |
stats = stats.sort(function(a, b) { return b['size'] - a['size']; }); | |
for (var c in stats) { print(stats[c]['ns'] + ": " + stats[c]['size'] + " (" + stats[c]['storageSize'] + ")"); } |
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
# apps in the *first* section of heroku apps output (i.e., apps that I own) | |
apps=( `heroku apps | sed -e '/^$/,$d' | grep -v '^=='` ) | |
# for each app that I own, show associated domains | |
for (( i = 0 ; i < ${#apps[@]} ; i++ )) | |
do | |
echo `heroku domains --app ${apps[$i]}` | |
done |
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
#!/usr/bin/env ruby | |
# Evaluates a sample of keys/values from each redis database, computing statistics for each key pattern: | |
# keys: number of keys matching the given pattern | |
# size: approximation of the associated memory occupied (based on size/length of value) | |
# percent: the proportion of this 'size' relative to the sample's total | |
# | |
# Copyright Weplay, Inc. 2010. Available for use under the MIT license. | |
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
module Datadog | |
module Contrib | |
module Sidekiq | |
module Tracing | |
def job_resource(job) | |
if job['wrapped'] | |
job['wrapped'] | |
elsif job['class'] == 'Sidekiq::Extensions::DelayedClass' | |
YAML.load(job['args'].first)[0..1].join('.') rescue job['class'] # rubocop:disable Security/YAMLLoad | |
else |
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
> "Báe".length | |
=> 4 | |
> "Báe".encoding | |
=> #<Encoding:UTF-8> | |
> "Báe".encode('utf-8', 'utf-8-mac').encoding | |
=> #<Encoding:UTF-8> | |
> "Báe".encode('utf-8', 'utf-8-mac').length | |
=> 3 |
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
# In most cases, script proceeds as expected: | |
$ ruby script.rb | |
................................................................................ done. | |
$ ruby script.rb | |
................................................................................ done. | |
# Occasionally, fails with empty results: | |
$ ruby script.rb | |
........script.rb:59:in `block (3 levels) in <main>': got a nil widget (RuntimeError) |
I hereby claim:
- I am joeyaghion on github.
- I am joeya (https://keybase.io/joeya) on keybase.
- I have a public key whose fingerprint is 7388 6671 6CF0 51A2 97BE 5D80 E61F 207F EE3F 0C11
To claim this, I am signing this object:
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
# In gravity Rails console, for example. | |
url = app.reset_password_url(a: 'b', c: 'd') | |
# => "http://www.example.com/reset_password?a=b&c=d" | |
url.html_safe? | |
# => false | |
ERB::Util.h(url) # explicitly call the h() helper that's implicitly called by <%= ... %> | |
# => "http://www.example.com/reset_password?a=b&c=d" | |
view = ActionView::Base.new('app/views', {}, ActionController::Base.new) | |
# => #<ActionView::Base:0x000000110c5a60 ...> | |
view.render(inline: "<html><body><%= url %></body></html>", locals: {url: url}) # encode implicitly |
NewerOlder