<behavioral_rules>
<rule_1>Always confirm a git commit before doing</rule_1>
<rule_2>For commits and PRs: focus on the user aspect, use a concise, non verbose and specific style</rule_2>
<rule_3>use Conventional Commits and the same style for PR titles</rule_3>
<rule_4>Store a full implementation plan in .planning/ for everthing that is a substential change</rule_4>
<rule_5>Before adding/modifying actions or middleware, read ARCHITECTURE.md and verify compliance</rule_5>
<rule_6>Display all behavioral_rules at start of every response</rule_6>
</behavioral_rules>
This file contains hidden or 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
| name: Flamegraph PR | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| ## USAGE: | |
| ## - put this file into your $PATH e.g. /usr/local/bin | |
| ## - make it executable: chmod a+x /usr/local/bin/cargo-bump | |
| ## - in your rust project just call: cargo bump | |
| BAK_BRANCH=$(git branch --show-current) | |
| B=chore/update-minor-versions-$(date +'%Y-%m-%d') |
This file contains hidden or 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
| # convert an ssh key to pem format | |
| ssh-keygen -f ~/.ssh/id_rsa.pub -e -m pem > ~/.ssh/id_rsa.pub.pem |
This file contains hidden or 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
| #include <Carbon/Carbon.h> | |
| // compile with: | |
| // clang -framework carbon get-win.c -o get-win | |
| int main(int argc, const char *argv[]) { | |
| CGWindowListOption options = kCGWindowListOptionOnScreenOnly | kCGWindowListExcludeDesktopElements; | |
| CFArrayRef windows = CGWindowListCopyWindowInfo(options, kCGNullWindowID); | |
| CFIndex count = CFArrayGetCount(windows); |
This file contains hidden or 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
| <script> | |
| let s = 0; | |
| let m = 0; | |
| let active = false; | |
| let timer; | |
| function setActive(a) { | |
| active = a; | |
| if(!active) { | |
| clearInterval(timer) |
This file contains hidden or 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
| #[derive(Debug)] | |
| pub struct List { | |
| head: Link, | |
| } | |
| #[derive(Debug)] | |
| pub struct Node { | |
| next: Link, | |
| data: i32, | |
| } |
This file contains hidden or 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 rust:latest as builder | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends \ | |
| musl-tools | |
| RUN rustup target add x86_64-unknown-linux-musl | |
| RUN rustup component add clippy | |
| WORKDIR /x |
This file contains hidden or 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
| // test/alphabet_position_test.rs | |
| use dev_challenge_47::alphabet_position; // <-- we don't have this function yet | |
| #[test] // <-- how to define a test in rust | |
| fn it_should_replace_the_a_with_1() { // <-- we express the requirement as name | |
| let replaced = alphabet_position("a"); | |
| assert_eq!(replaced, "1"); // <-- we assert that the both are equal | |
| } |
This file contains hidden or 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
| // src/lib.rs | |
| pub fn alphabet_position(s: &str) -> String { | |
| String::from("Hello") | |
| } |
NewerOlder