- A
secret
byte you want to read is stored at inaccessible memory locationpriv_mem
. - The sender triggers an access exception by attempting to read
priv_mem
. - Due to CPU optimization (out-of-order execution), the load of
secret
frompriv_mem
and the use of its value in (4) and (5) below may execute before the exception is triggered. - Calculate an
offset
into a known arrayprobe
by multiplyingsecret
by the width of a cache line (or whatever block size the CPU typically fetches, like a 4096-byte page). This guarantees each of those 256 possible offsets will cache separately. - Load
probe[offset]
, which causes the CPU to cache exactly one chunk of of our array, populating one cache line. - The exception finally triggers, clearing the modified registers...but cached data is not excised.
- Iterate over all 256 offsets into
probe
to find out which one loads fast. You've determined the value ofsecret
.
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
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
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
def original_method(a, b) | |
puts "Called with #{a} and #{b}" | |
if block_given? | |
puts "Calling the block" | |
yield | |
end | |
end | |
def wrapper1(*args) # WRONG: doesn't pass the block | |
puts "Hi I'm wrapper1" |
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
ruby -e'_,__="",binding;loop do$><<">> "if$/>_ | |
puts"=> %p"%[__.eval(_+=gets||exit!),_=""] | |
rescue Exception | |
puts"\e[31m%p\e[0m"%[$!,_=""]if/d e|ee/!~"#$!"end' |
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
From a034498e36c02715b9201646d4ce1ddcddf118c3 Mon Sep 17 00:00:00 2001 | |
From: Shugo Maeda <shugo@ruby-lang.org> | |
Date: Wed, 29 Apr 2015 09:14:15 +0900 | |
Subject: [PATCH] support ES6-like hash literals. | |
--- | |
parse.y | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++------------- | |
1 file changed, 72 insertions(+), 17 deletions(-) | |
diff --git a/parse.y b/parse.y |
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
/* | |
Windows | |
Location: C:\Users\<YourUsername>\AppData\Roaming\Mozilla\Firefox\Profiles\<YourFirefoxProfile>\chrome | |
Notes: | |
If minimize, maximize, and close buttons are no longer visible, enable the Title Bar or Menu Bar in Firefox Customize. | |
macOS | |
Location: /Users/<YourUsername>/Library/Application Support/Firefox/Profiles/<YourFirefoxProfile>/chrome | |
Notes: | |
If minimize, maximize, and close buttons overlap other controls, add the Flexible Space in Firefox Customize. |
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
// @flow | |
import React from 'react'; | |
import styled from 'styled-components'; | |
type GlobalCssValues = 'initial' | 'inherit' | 'unset'; | |
type WrapValue = 'nowrap' | 'wrap' | 'wrap-reverse' | GlobalCssValues; | |
type JustifyValue = | |
| 'center' |
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
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
raise e | |
end | |
gemfile(true) do | |
source "https://rubygems.org" |
See character.construction/emoji-vs-text for more up-to-date listings.
Text (U+FE0E) | Default | Emoji (U+FE0F) | Name |
---|---|---|---|
😀︎ | 😀 | 😀️ | GRINNING FACE |
😁︎ | 😁 | 😁️ | GRINNING FACE WITH SMILING EYES |
😂︎ | 😂 | 😂️ | FACE WITH TEARS OF JOY |
🤣︎ | 🤣 | 🤣️ | ROLLING ON THE FLOOR LAUGHING |
Please note: See character.construction/emoji-categories for more up-to-date listings.
😀 😁 😂 🤣 😃 😄 😅 😆 😉 😊 😋 😎 😍 😘 🥰 😗 😙 😚
NewerOlder