Skip to content

Instantly share code, notes, and snippets.

@cag
cag / neutral-b-osc
Created March 2, 2016 15:45
Neutral B Oscillations
# $B^0$ Oscillations
## Introduction
The $B^0_d(d\bar{b})$ and $B^0_s(s\bar{b})$ mesons undergo matter-antimatter oscillations due to second-order weak interactions.[^osc]
![](http://www.ppd.stfc.ac.uk/PPD/resources/image/jpg/mixing.jpg.jpg)
The asymmetry of the $B^0$ meson decay tends to favor matter production over antimatter production, but the Standard Model predicts that the $B^0$ decay asymmetry alone cannot account for the preponderance of matter over antimatter in the universe.[^LHCb-trouble] Flavor eigenstates do not share an eigenbasis with physical particle states, and the mass difference between the physical particle states give rise to a phase difference in the physical state time evolutions, causing pure flavor states to mix after some time. Experiments exploring this phenomenon are crucial tests of the Standard Model and place restrictions on viable physical theories.
@cag
cag / lmpdogd.yaml
Created January 15, 2017 02:11
LetsEncrypt Nginx Postfix Dovecot OpenDKIM Ghost Discourse on Ubuntu 16.04
#cloud-config
users:
- name: alan
ssh-authorized-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDZ/639L+2Npw2AgQIE4cro933W4BGH0UPOaPVFUZikJ/BwnCDcUXscR/ehoZblbNwt1YbPSOm4yR93Yl6kFQwYRWhL8WI20mt9/ukeNKG2D3Cc/w63AjUa61kDapNRQCuqlaO1bf2//h18RuZnnrJnoMcsWVs5cWOYmpOHKdIdcX7MBy2+AYSs5OCYRqJri9WaZbFKQ13MfpJ1kA771GNNRwSypqRVNiBtqzG8fMaZEofmefnZdhNOApHZ94Tpfj7X+wUbLEGV7B9VmlHOF5fPzBGBTmg7NjXR9o1jud5bHRHtlLmK9Oj9M5VovL8qTNrJzmRQKzC/6FMbNFS0JSJuxs7KQTYKfNIXFk/53ZoK2oSnALh/v7p3s5pm8yVzUlUIxQtiUXQAsbnEHNhsWQXKBa8UHNCQYSxDojbw0Edkc1oLGZ9aX5HWD6kHxxlBheSOxXxtgn1bVGACiTgfwB9B5aKAiT1Eu7vBzQUoZyK5n31nKh0Q/4doNrQuZAy+XUjEVlLCU8e0FmThSd+ydfbIGBnKpPyz2MGnoreemN2Eli2Fl+eb+98uTya10V8VZO/bmOdnt9ZrjYqT8ZmOHyCKgHLItomhbJglEnpHBYZlEaQXO0aFEam1Dvgz1i9V62hwsLEayyKfPWckknUi6LFOWdP8RoKUrzHLpllbfZAFxQ== alanarch
sudo: ['ALL=(ALL) NOPASSWD:ALL']
groups: sudo
shell: /bin/bash
packages:
- letsencrypt
@cag
cag / rinkeby-address
Created August 22, 2017 22:41
For Rinkeby faucet
0x0a61348c1bf11479626fcdddd985f2600820b35a
@cag
cag / olympia-deploy-address
Last active October 30, 2017 16:51
olympia-deploy-address
0x8a5e5508046316a6511d24306bcaab0a6d8511f1
pragma solidity ^0.4.21;
import "./Kombucha.sol";
contract KombuchaFactory {
function createKombucha(string flavor, uint fillAmount, uint capacity)
public
returns (Kombucha)
{
return new Kombucha(flavor, fillAmount, capacity);
pragma solidity ^0.4.21;
import "./KombuchaWithInit.sol";
import "./ProxyPostByzantium.sol";
contract KombuchaFactory {
Kombucha private masterCopy;
function KombuchaFactory(Kombucha _masterCopy) public {
masterCopy = _masterCopy;
pragma solidity ^0.4.21;
import "./ProxyPostByzantium.sol";
import "./KombuchaMINoAcc.sol";
contract KombuchaFactory {
Kombucha private masterCopy;
function KombuchaFactory() public {
masterCopy = new Kombucha();
pragma solidity ^0.4.21;
contract OwnableData {
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
address internal owner;
pragma solidity ^0.4.21;
import "./ProxyPostByzantium.sol";
import "./Ownable.sol";
contract UpdateableProxyData is ProxyData, OwnableData {}
contract UpdateableProxy is Proxy, Ownable {
function UpdateableProxy(address proxied, address owner)
public
@cag
cag / OracleMetadataTests.sol
Last active December 13, 2020 09:35
Gas tests for oracle metadata
pragma solidity ^0.4.24;
contract SingleWordConsumer {
event LogWord(bytes32 w);
function receiveResult(bytes) external {
bytes32 w;
assembly {
w := calldataload(0x44) // 4 byte func selector +
// word of 1st arg offset +