View lint.yaml
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
name: lint commit messages | |
on: | |
pull_request: | |
jobs: | |
commit-lint: | |
runs-on: "ubuntu-latest" | |
steps: |
View pre-commit
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
#!/usr/bin/env bash | |
Green='\e[0;32m' # Green | |
Red='\e[0;31m' # Red | |
Color_Off='\e[0m' # Text Reset | |
files=$(cargo fmt -- --check --files-with-diff) | |
staged=$(git diff --name-only --staged) |
View mypackage.nix
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
{ pkgs ? (import <nixpkgs> {}) }: | |
rec { | |
# import nixpkgs from a specific commit hash | |
oldNixpkgs = pkgs.fetchFromGitHub { | |
owner = "nixos"; | |
repo = "nixpkgs"; | |
# here goes the commit hash | |
rev = "c2268175651c4aa1da23c1b84ecebc0a0df56633"; |
View git-diff-to.sh
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
#!/usr/bin/env bash | |
help() { | |
cat <<EOS | |
$0 [-h | --help] [base] [head] | |
Diff current branch (or [head], if passed) to [base] | |
EOS | |
} |
View lib.rs
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
// should be all code... | |
use std::pin::Pin; | |
use std::result::Result as RResult; | |
use futures::Stream; | |
use futures::StreamExt; | |
use futures::task::Context; | |
use futures::task::Poll; | |
use anyhow::Error; |
View remote-build.sh
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
#!/usr/bin/env bash | |
host="$1" | |
branch="$2" | |
pkg="$3" | |
remote_dir="$$" | |
[[ -z "$host" ]] && { echo "no HOST"; exit 1; } | |
[[ -z "$branch" ]] && { echo "no branch"; exit 1; } | |
[[ -z "$pkg" ]] && { echo "no pkg"; exit 1; } |
View example.rs
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 cursive::event::{Event, Key}; | |
use cursive::traits::*; | |
use cursive::views::{Dialog, EditView, OnEventView, TextArea}; | |
use cursive::Cursive; | |
use cursive::view::Boxable; | |
use cursive::views::SelectView; | |
use cursive::event::EventResult; | |
use cursive::align::HAlign; | |
use cursive_context_menu::ContextMenu; |
View sway config
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
# | |
# Copy this to ~/.config/sway/config and edit it to your liking. | |
# | |
# Read `man 5 sway` for a complete reference. | |
# | |
input * xkb_layout "de" | |
input * xkb_variant "nodeadkeys" | |
input 2:7:SynPS/2_Synaptics_TouchPad { |
View git-apply-github-pr
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
#!/usr/bin/env bash | |
while read line | |
do | |
patch=$(echo "$line" | sed | |
's,github\.com,patch-diff.githubusercontent.com/raw,; s,$,.patch,') | |
prnr=$(echo "$line" | sed 's,.*/,,') | |
curl $patch | git am -s || exit 1 |
View utils.nix
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
{ pkgs }: | |
rec { | |
optimizeWithFlag = pkg: flag: | |
pkg.overrideAttrs (attrs: { | |
NIX_CFLAGS_COMPILE = (attrs.NIX_CFLAGS_COMPILE or "") + " ${flag}"; | |
}); | |
optimizeWithFlags = pkg: flags: | |
pkgs.lib.foldl' (pkg: flag: optimizeWithFlag pkg flag) pkg flags; |
NewerOlder