change-github-default-branch.sh
Usage
change-github-default-branch.sh "$GITHUB_TOKEN" PurpleBooth/homebrew-repo
Does not delete the old default branch, or change where pull requests are based from, incase something breaks.
Usage
change-github-default-branch.sh "$GITHUB_TOKEN" PurpleBooth/homebrew-repo
Does not delete the old default branch, or change where pull requests are based from, incase something breaks.
#!/usr/bin/env run-cargo-script | |
//! This is a regular crate doc comment, but it also contains a partial | |
//! Cargo manifest. Note the use of a *fenced* code block, and the | |
//! `cargo` "language". | |
//! | |
//! ```cargo | |
//! [dependencies] | |
//! git2 = "0.13" | |
//! ``` |
use futures::future::join_all; | |
use futures::StreamExt; | |
use reqwest::Client; | |
use serde::{Deserialize, Serialize}; | |
#[derive(Serialize, Deserialize, Debug)] | |
struct ProjectsItem { | |
hash_id: String, | |
} |
use std::collections::HashMap; | |
use futures::{stream, StreamExt}; | |
use reqwest::Client; | |
use serde::{Deserialize, Serialize}; | |
use std::error::Error; | |
#[derive(Serialize, Deserialize, Debug)] | |
struct ProjectsItem { | |
hash_id: String, |
#!/usr/bin/env bash | |
set -euo pipefail | |
CACHE_DIR="${XDG_CACHE_HOME:-$HOME/Library/Caches}/wrapper-1password" | |
CACHE_FILE="$CACHE_DIR/session-token.yaml" | |
OP_LOCATION="$(command -v op)" | |
mkdir -p "$CACHE_DIR" |
#!/usr/bin/env fish | |
# You can do something similar in fish too | |
function gfmfmt | |
for I in $argv | |
set -lx TEMPORARY_FILE (mktemp -d)"/"(basename "$I") | |
pandoc --from=gfm --to=gfm --wrap=auto "$I" > "$TEMPORARY_FILE" | |
mv "$TEMPORARY_FILE" "$I" | |
end |
// Create an object with hollow methods (does not need to implement everything) | |
const myTestDouble = { | |
exampleMethod: (): any => { | |
} | |
} as RealClass; | |
// Then to return something | |
spyOn(myTestDouble, 'exampleMethod').and.returnValue("Stubbed Value"); |
Create a class with 2 methods:
The rules for scoring are as follows
Create a class with 2 methods:
The rules for scoring are as follows