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
// ==UserScript== | |
// @name Youtube Volume Slider | |
// @description Custom volume slider for youtube music. | |
// @author mdrokz | |
// @match https://music.youtube.com/* | |
// @version 2.6 | |
// ==/UserScript== | |
(function() { |
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
let v: Vec<&Token> = tokens.iter().enumerate().filter_map(|(i, token)| { | |
match token.t { | |
t if t == TokenType::Function && tokens[i + 1].t == TokenType::Name => Some(token), | |
t if t == TokenType::Name && tokens[i + 1].t == TokenType::Lp => Some(token), | |
TokenType::Function | |
| TokenType::Add | |
| TokenType::Eos | |
| TokenType::End | |
| TokenType::Name | |
| TokenType::Comma |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <Windows.h> | |
int main(int argc, char const *argv[]) | |
{ | |
// store system_time for restoration | |
SYSTEMTIME original_time; | |
GetSystemTime(&original_time); |
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
FROM alpine:latest | |
RUN apk add -U openssh sudo wireguard-tools | |
RUN echo -e "Port 2222\n" >> /etc/ssh/sshd_config | |
RUN echo '%wheel ALL=(ALL) ALL' > /etc/sudoers.d/wheel | |
RUN adduser --disabled-password test wheel |
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
function getRepos | |
gh api graphql -F login=$argv[1] -F first=$argv[2] -F query=' | |
query($login: String!, $first: Int!) { | |
user(login: $login) { | |
repositories(first: $first) { | |
totalCount | |
nodes { |
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
function generate_wg_client | |
mkdir /home/mdrokz/wireguard/$argv[1] | |
cd /home/mdrokz/wireguard/$argv[1] | |
umask 077 | |
touch $argv[1].conf | |
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
function public_ip | |
curl http://httpbin.org/ip --silent | jq .origin | tr -d \" | |
end |
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
# Usage - start_emulator Pixel 5 | |
function start_emulator | |
set emulator_list (~/Android/Sdk/emulator/emulator -list-avds) | |
for emulator in $emulator_list | |
set emulator_name (string split _ $emulator -f 1) | |
set emulator_version (string split _ $emulator -f 2) | |
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
function clone_repos | |
for i in (seq 0 $argv[2]) | |
set s ".nodes[$i].name" | |
set name (getRepos $1 $2 | jq '{nodes: .data.user.repositories.nodes}' | jq $s | tr -d '"') | |
if [ ! "$name" == "null" ]; then | |
gh repo clone $1/$name | |
fi |
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
macro_rules! map { | |
($($v: literal => $s: expr),*) => {{ | |
let mut h = HashMap::new(); | |
$( | |
h.insert($v,$s); | |
)* | |
h | |
}} | |
} |
OlderNewer