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/python3 | |
from bcc import BPF | |
# I just wanted to check if hardware acceleration for video decoding in firefox is | |
# actually being used. Thus I wrote this simple BCC script to check whether trace_va_render | |
# inside libva.so is being called. | |
# BPF program | |
bpf_text = """ | |
#include <uapi/linux/ptrace.h> |
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
package main | |
import ( | |
"context" | |
"encoding/json" | |
"fmt" | |
"log" | |
"os" | |
"sync" | |
"time" |
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
[Unit] | |
Description=Generates K3S NodeIP Entry With Tailscale IP | |
Requires=network.target | |
Requires=tailscaled.service | |
Before=k3s.service | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes |
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
--- | |
- hosts: localhost | |
tasks: | |
- name: get protonvpn servers | |
ansible.builtin.uri: | |
url: https://api.protonmail.ch/vpn/logicals | |
register: protonvpn_servers | |
- name: filter protonvpn profiles | |
set_fact: |
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
config: | |
user.user-data: | | |
#cloud-config | |
package_upgrade: true | |
packages: | |
- vim | |
- nano | |
- git | |
- curl | |
- wget |
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
package main | |
import ( | |
"fmt" | |
"time" | |
"github.com/automerge/automerge-go" | |
) | |
type S struct { |
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
import { | |
BulkWriteRow, | |
EventBulk, | |
RxAttachmentData, | |
RxAttachmentWriteData, | |
RxDocumentData, | |
RxDocumentDataById, | |
RxJsonSchema, | |
RxStorage, | |
RxStorageBulkWriteResponse, |
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
export const getScrollParent = (node?: Element | null): Element | null => { | |
if (node == null) { | |
return null; | |
} | |
if (node.scrollHeight > node.clientHeight) { | |
return node; | |
} else { | |
return getScrollParent(asElement(node.parentNode)); | |
} |
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
#cloud-config | |
groups: | |
- docker | |
users: | |
- name: ubuntu | |
sudo: ALL=(ALL) NOPASSWD:ALL | |
groups: users,docker,admin | |
ssh-authorized-keys: | |
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDwB83EYt+55hfu6SzIFKrZ7E8Vli2NaZ5E1vgieFslSGJfJGECfrK8m26/5US/W+Rjfgi9VR0L1zY92eld92134mQQFiPeGWpU88iUVykNmm6B8iA6I/AlzPa+qeZaH5iteWvUxqApZ1s0nFnIVA9PI9+OSzEX/nDrWEiNMxc2H1L0GIf/OAzCEs8WllVSHSqA35wuXQBkPDF6d+SMtRe6tZ82BT5InSFmWVP+TBREV2/okrgEJSF9exD8myXKuPqe4pCZqVgiHMi1NpGs/sDack/yuOHVT+eMKVE23j4r5zhvkMS4Y4oEpj4v0V8DChZSniMvhvp9qxKMJJKwKDWn |
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/bash | |
[[ $ENVRC_RUN != yes ]] && source /etc/envrc | |
# whether running via vscode env probe | |
if shopt -q login_shell && [[ "$BASH_EXECUTION_STRING" =~ $HOME/.vscode-server/bin/.*/node ]]; then | |
old_bash_path="$(which bash)" | |
if [ ! -z "${ENV_PRINT_COMMAND}" ]; then | |
cd "${WORKSPACE_DIR}" |
NewerOlder