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 <string.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <unistd.h> | |
int main() { | |
int server_fd, new_socket; | |
struct sockaddr_in address; | |
int addrlen = sizeof(address); | |
char buffer[1024] = {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 <memory.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define int long long // work with 64bit target | |
int token; | |
int *text, *old_text, *stack; | |
char *data; |
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
zig-cache/ | |
zig-out/ | |
/release/ | |
/debug/ | |
/build/ | |
/build-*/ | |
/docgen_tmp/ | |
.DS_Store |
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 os | |
import re | |
def replace_word_in_file(file_path, word_to_search, replacement_word): | |
with open(file_path, 'r', encoding='utf-8') as file: | |
content = file.read() | |
# Regular expression to match words within string literals | |
# This handles both single and double quotes | |
pattern = re.compile(r'(["\'])(.*?)(\b' + re.escape(word_to_search) + r'\b)(.*?)\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
"""Alternative to s3fs-fuse-awscred-lib that handles credential refreshing | |
using a background thread and the existing credentials service. | |
This implementation: | |
- Periodically refreshes credentials without restarting s3fs | |
- Uses existing credentials service | |
- Handles role assumption | |
- Provides proper error handling | |
- Supports debug logging | |
""" |