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 <cctype> | |
| #include <ctime> | |
| #include <stdexcept> | |
| #include <vector> | |
| #include <string> | |
| std::vector<std::string> split(const std::string &s, char delimiter) { | |
| std::vector <std::string> tokens; | |
| # if 0 // stringstream is too much heavy for basic tokenization | |
| std::string token; |
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
| // ==UserScript== | |
| // @name ytlocal | |
| // @version 1.0 | |
| // @description ytlocal | |
| // @match *://*.youtube.com/watch?* | |
| // @grant none | |
| // @run-at document-end | |
| // ==/UserScript== | |
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 <concepts> | |
| # include <cstddef> | |
| # include <iostream> | |
| # include <memory> | |
| # include <new> | |
| # include <type_traits> | |
| # include <utility> | |
| # include <vector> | |
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
| [CPU] | |
| 0-39=0 | |
| 40-44=10 | |
| 45-49=20 | |
| 50-54=30 | |
| 55-59=40 | |
| 60-64=50 | |
| 65-69=60 | |
| 70-74=70 | |
| 75-79=80 |
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 | |
| cmd_list="$1" | |
| arg_list=${@:2} | |
| mkdir -p build | |
| proj=$(basename "$(pwd)") | |
| status=0 |
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 <stdio.h> | |
| # include <inttypes.h> | |
| uint_least16_t binrev (uint_least16_t n) | |
| { | |
| uint_least16_t r = 0; | |
| while (n) | |
| { | |
| r <<= 1; | |
| r |= n & 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
| {{ $thumb_base64 := readFile (printf "%s%s" "/public" (.Fill "150x115 q100").RelPermalink) | base64Encode }} | |
| <img src="data:image;base64,{{ $thumb_base64 }}" /> |
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
| #!/bin/sh | |
| OPFILE=$2 | |
| OPMIC_NAME=opusmic | |
| OPMIC_FILE=/tmp/opusmic | |
| OPMIC_RAW=/tmp/opusmic.raw | |
| mkdir -p ~/.config/pulse | |
| OPMIC_CONF=~/.config/pulse/client.conf |
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
| template <typename T> | |
| auto popcount8R (const T & val) -> int | |
| { | |
| static_assert (std::is_integral <T> :: value && ! std::is_signed <T> :: value); | |
| if (val == 0) | |
| return 0; | |
| const unsigned char m1 = 0b01010101; | |
| const unsigned char m2 = 0b00110011; |
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
| interesting dwm patches to look: | |
| https://dwm.suckless.org/patches/cropwindows/ | |
| https://dwm.suckless.org/patches/dynamicswallow/ | |
| https://dwm.suckless.org/patches/keychain/ | |
| https://dwm.suckless.org/patches/reorganizetags/ | |
| https://dwm.suckless.org/patches/status2d/ | |
| interesting st patches to look: | |
| https://st.suckless.org/patches/background_image/ | |
| https://st.suckless.org/patches/sync/ | |
| https://st.suckless.org/patches/undercurl/ |
NewerOlder