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
| /* | |
| * jjy_sender.c | |
| * $ gcc -O2 -DIS_GPIOD_V2=0 -DGPIO_LINE_NUMBER=18 -DCHIP_PATH='"/dev/gpiochip1"' -DCONSUMER='"my_custom_sender"' jjy_sender.c -o jjy_sender -lgpiod | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| #include <unistd.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
| export default { | |
| async fetch(request, env, ctx) { | |
| const url = new URL(request.url); | |
| // 1. クエリパラメータまたはパスから channel_id を取得 | |
| // 例: https://worker-name.subdomain.workers.dev/?channel_id=UC... | |
| // 例: https://worker-name.subdomain.workers.dev/UC... | |
| let channelId = url.searchParams.get("channel_id") || url.pathname.split("/")[1]; | |
| const channelIdRegex = /^UC[a-zA-Z0-9_-]{22}$/; |
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
| /* | |
| $ gcc -Wall -fPIC -shared -o pfnull.so pfnull.c -ldl | |
| export LD_PRELOAD=/usr/local/lib/pfnull.so | |
| */ | |
| #define _GNU_SOURCE | |
| #include <stdio.h> | |
| #include <dlfcn.h> | |
| #include <stdarg.h> | |
| #include <string.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
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| use utf8; | |
| use 5.014; | |
| use Encode; | |
| use JSON::PP qw/encode_json decode_json/; | |
| use Sys::Hostname; | |
| use IPC::Open2; |
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 perl | |
| use strict; | |
| use warnings; | |
| use HTTP::Tiny; | |
| use Digest::MD5 'md5_hex'; | |
| my $prefix = 'cloudflare-origin'; | |
| updatelist('v4'); |
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 perl | |
| use strict; | |
| use warnings; | |
| use HTTP::Tiny; | |
| my $prefix = 'cloudflare-origin'; | |
| die "ERR: requires one argument: output file path" unless scalar @ARGV == 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 perl | |
| use strict; | |
| use warnings; | |
| use HTTP::Tiny; | |
| my $prefix = 'cloudflare-origin'; | |
| updatelist('v4'); |
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
| name: Show kustomized Application diff | |
| on: | |
| pull_request: | |
| paths: | |
| - '**.yaml' | |
| - '**.yml' | |
| jobs: | |
| enumerate: | |
| name: Enumerate ArgoCD Applications |
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
| // Streamから一行読み込む関数 | |
| String readLine(Stream* s){ | |
| String ret; | |
| bool start = false; | |
| while(true){ | |
| int ch = s->read(); | |
| if(ch < 0){ | |
| return ret; | |
| } | |
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
| # home/end key | |
| bindkey "^[[H" beginning-of-line | |
| bindkey "^[[F" end-of-line | |
| # git | |
| autoload -Uz vcs_info | |
| setopt prompt_subst | |
| zstyle ':vcs_info:git:*' check-for-changes true | |
| zstyle ':vcs_info:git:*' stagedstr "%F{magenta}!" | |
| zstyle ':vcs_info:git:*' unstagedstr "%F{yellow}+" |
NewerOlder