Skip to content

Instantly share code, notes, and snippets.

@badboy
badboy / playground.rs
Created December 12, 2018 19:13 — forked from rust-play/playground.rs
Code shared from the Rust Playground
trait StateSet {
fn next(self) -> (u32, Self);
}
trait State {
type S: StateSet;
fn next(self) -> (u32, Self::S);
}
macro_rules! delegate {
From b67bab4252dd0d3c707654721509764afc8e8b54 Mon Sep 17 00:00:00 2001
From: Jan-Erik Rediger <[email protected]>
Date: Tue, 11 Dec 2018 00:41:36 +0100
Subject: [PATCH] Disable midnight throttling through a pref
---
toolkit/components/telemetry/app/TelemetrySend.jsm | 6 ++++++
toolkit/components/telemetry/app/TelemetryUtils.jsm | 1 +
.../tests/marionette/harness/telemetry_harness/testcase.py | 3 ++-
3 files changed, 9 insertions(+), 1 deletion(-)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <z3.h>
int main(int argc, char** argv)
{
Z3_config cfg = Z3_mk_config();
Z3_context ctx = Z3_mk_context(cfg);
Z3_solver solver = Z3_mk_solver(ctx);
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <z3.h>
int main(int argc, char** argv)
{
Z3_config cfg = Z3_mk_config();
Z3_context ctx = Z3_mk_context(cfg);
#![allow(dead_code)]
#![allow(unused_variables)]
extern crate env_logger;
#[macro_use]
extern crate log;
extern crate semver;
extern crate z3;
use semver::{Version, VersionReq};
# vim: ft=sh
# via: https://github.com/mitsuhiko/dotfiles/blob/master/zsh/custom/themes/mitsuhiko.zsh-theme
setopt prompt_subst
export LSCOLORS=ExGxFxDxCxHxHxCbCeEbEb
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[blue]%}git%{$reset_color%}:"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}+"
ZSH_THEME_GIT_PROMPT_BRANCH=""
@badboy
badboy / playground.rs
Created September 27, 2018 20:05 — forked from rust-play/playground.rs
Code shared from the Rust Playground
#![allow(unused)]
use std::collections::HashMap;
#[derive(Debug)]
enum Scalar {
String(String),
Unsigned(u32),
Bool(bool),
}
@badboy
badboy / playground.rs
Created September 27, 2018 16:27 — forked from rust-play/playground.rs
Code shared from the Rust Playground
use std::any::Any;
use std::any::TypeId;
#[derive(Debug)]
enum Scalar {
String(String),
Unsigned(u32),
Bool(bool),
}
@badboy
badboy / playground.rs
Created September 27, 2018 15:53 — forked from rust-play/playground.rs
Code shared from the Rust Playground
#![allow(unused)]
mod generic {
pub struct Scalar<T: Default> {
value: T,
}
impl<T: Default> Scalar<T> {
pub fn new() -> Self {
Scalar {
This file has been truncated, but you can view the full file.
#!/bin/bash
set -e
echo "Step 0: Create a new branch"
git branch mdbook-2
git checkout mdbook-2
echo "Step 1: Prepare"