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
import "sunscreen/src/FHE.sol"; | |
contract PrivateTxExample { | |
// Encrypted balances | |
mapping(address => bytes) balances; | |
constructor() { | |
// Instantiate our FHE subcontract | |
fhe = new FHE(); | |
} |
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
import "sunscreen/src/FHE.sol"; | |
contract PrivateTxExample { | |
// Encrypted balances | |
mapping(bytes => bytes) balances; | |
constructor() { | |
// Instantiate our FHE subcontract | |
fhe = new FHE(); | |
} |
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
use sunscreen::{ | |
bulletproofs::BulletproofsBackend, | |
types::zkp::{BulletproofsField, NativeField}, | |
zkp_program, zkp_var, BackendField, Compiler, Error, ZkpRuntime, | |
}; | |
#[zkp_program] | |
fn sudoku_proof<F: BackendField>( | |
#[public] board: [[NativeField<F>; 9]; 9], | |
solution: [[NativeField<F>; 9]; 9], |
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
use clap::{App, AppSettings, Arg}; | |
fn main() { | |
let matches = App::new("myprog") | |
.setting(AppSettings::SubcommandsNegateReqs) | |
.subcommand( | |
App::new("config").about("configuration mgmt").arg( | |
Arg::new("reset") | |
.short('r') | |
.about("reset config to defaults"), |
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
<?xml version='1.0' encoding='UTF-8' standalone='no' ?> | |
<opml version="2.0"> | |
<head> | |
<title>RadioPublic</title> | |
<dateCreated>Jul 12, 2020 8:20:23 PM</dateCreated> | |
</head> | |
<body> | |
<outline text="America Dissected: Coronavirus " title="America Dissected: Coronavirus " type="link" xmlUrl="http://feeds.feedburner.com/america-dissected" /> | |
<outline text="Crooked Minis" title="Crooked Minis" type="link" xmlUrl="http://feeds.feedburner.com/crooked-conversations" /> | |
<outline text="Deconstructed with Mehdi Hasan" title="Deconstructed with Mehdi Hasan" type="link" xmlUrl="http://rss.prod.flmcloud.net/deconstructed/podcast.rss" /> |
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
use crossterm::{execute, style::Color::*, terminal}; | |
use std::io::Write; | |
use termimad::*; | |
static MD: &str = r#" | |
You are conflating a few concepts. | |
[Concurrency is not parallelism](https://stackoverflow.com/q/1050222/155423), and `async` and `await` are tools for *concurrency*, which may sometimes mean they are also tools for parallelism. | |
Additionally, whether a future is immediately polled or not is orthogonal to the syntax chosen. |
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
\usepackage{fancyhdr} | |
\usepackage{extramarks} | |
\usepackage{amsmath} | |
%\usepackage{amsthm} | |
\usepackage{amsfonts} | |
\usepackage{amssymb} | |
\usepackage{tikz} | |
\usepackage[plain]{algorithm} | |
\usepackage{algpseudocode} | |
\usepackage{physics} |
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
stack-ghcid() | |
{ | |
ghcid -c 'stack ghci '"$@"'' | |
} | |
_stack-ghcid() | |
{ | |
local CMDLINE | |
local IFS=$'\n' | |
export COMP_LINE="${COMP_LINE/stack-ghcid/'stack ghci'}" |
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
// ==UserScript== | |
// @name Free Surfline Forecasts | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Unblurr restricted forecast data. They are dumb enough to actually put the real data in the DOM. | |
// @author samtay | |
// @match http*://www.surfline.com/* | |
// @grant none | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name Better Indeed | |
// @version 0.1 | |
// @description Ignores sponsored links | |
// @author samtay | |
// @match http*://www.indeed.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { |
NewerOlder