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 | |
| # slowci.sh | |
| # Usage: ./slowci.sh <percentage> <cores> -- command [args...] | |
| # Example: ./slowci.sh 20 4 -- make test | |
| set -e | |
| if [[ $# -lt 4 || "$3" != "--" ]]; then | |
| echo "Usage: $0 <percentage> <cores> -- command [args...]" | |
| exit 1 |
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 elixir | |
| # Minimal Phoenix LiveView single file example | |
| # Run with: elixir minimal_liveview.exs | |
| # Access at: http://localhost:4001 | |
| Application.put_env(:minimal_app, MinimalApp.Endpoint, | |
| http: [ip: {127, 0, 0, 1}, port: 4001], | |
| server: true, | |
| live_view: [signing_salt: "aaaaaaaa"], |
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
| defmodule SimpleDNSServer do | |
| @moduledoc """ | |
| A simple DNS server that responds to TXT queries with fixed sample values. | |
| """ | |
| # Use 5353 for testing to avoid requiring root privileges for port 53 | |
| @dns_port 9999 | |
| @txt_records ["v=spf1 include:_spf.example.com ~all", "key1=value1", "key2=value2"] | |
| def start do |
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
| keymap("i", ",,", "<esc>\"tyiWi<<esc>Ea>", {}) | |
| keymap("i", ",.", "<esc>\"tyiWi<<esc>Ea><esc>i<space>", {}) | |
| keymap("i", "//", "</<esc>\"tpa>", {}) |
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: split.sh <source_branch> <target_branch> [<main_branch>] | |
| # example: split.sh origin/wip-feature-dirty feature-clean origin/main | |
| # I often work on long-living dirty feature branches, saving garbage "wip" | |
| # checkpoints, before I fully understand what am I even doing. | |
| # When the feature is finished and tested, I end up with the garbage log that's | |
| # mostly meaningless, but not quite. I find it hard to separate sensible commit |
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
| <?xml version="1.0" encoding="utf-8" standalone="no"?> | |
| <opml version="1.0"> | |
| <head> | |
| <title>Pocket Casts Feeds</title> | |
| </head> | |
| <body> | |
| <outline text="feeds"> | |
| <outline text="Stuff You Should Know" xmlUrl="https://www.omnycontent.com/d/playlist/e73c998e-6e60-432f-8610-ae210140c5b1/a91018a4-ea4f-4130-bf55-ae270180c327/44710ecc-10bb-48d1-93c7-ae270180c33e/podcast.rss" type="rss" /> | |
| <outline type="rss" xmlUrl="https://feeds.megaphone.fm/stufftoblowyourmind" text="Stuff To Blow Your Mind" /> | |
| <outline xmlUrl="https://feeds.megaphone.fm/stufftheydontwantyoutoknow" type="rss" text="Stuff They Don't Want You To Know" /> |
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
| PID: 87969 (nvim) | |
| UID: 1000 (hq1) | |
| GID: 1000 (hq1) | |
| Signal: 11 (SEGV) | |
| Timestamp: Sun 2020-07-05 00:26:32 CEST (2min 47s ago) | |
| Command Line: nvim | |
| Executable: /usr/bin/nvim | |
| Control Group: /user.slice/user-1000.slice/session-1.scope | |
| Unit: session-1.scope | |
| Slice: user-1000.slice |
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 | |
| url1="https://en.bab.la/dictionary/english-polish/$1" | |
| url2="https://en.bab.la/dictionary/polish-english/$1" | |
| shoot() { | |
| curl -s $1 | pup 'div.content > div > div > div > ul.sense-group-results > li a text{}' 2>&1 | | |
| awk 'NF' | head -n 3 | grep -v EOF | |
| } |
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
| jq -r '.[] | "qrencode -o- -d 300 -s 10 \"otpauth://totp/" + (.label | gsub("[- ]"; "%20")) + "?secret=" + .secret + "\" | display"' codes.txt | while read line; do | |
| eval ${line} | |
| done |
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 | |
| PROJECT=${1:-newproject} | |
| git clone git@github.com:jgthms/bulma-start.git $PROJECT && cd $PROJECT && npm install | |
| tmux split-window -h 'npx browser-sync start --server --files "*.html" --files "css/*.css"' | |
| tmux split-window -v 'npm start' | |
| nvim . |
NewerOlder