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
// hello.c | |
#include <stdio.h> | |
int faulty_devider(int first, int second) { | |
return first / second; | |
} | |
int main() { | |
int a = 100; |
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> | |
#ifndef MYFLAG | |
#define MYFLAG "default flag" | |
#endif | |
int main() { | |
printf("compiled with: %s\n", MYFLAG); | |
return 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> | |
#define WARN_IF(EXPR) \ | |
if (EXPR) { \ | |
fprintf(stderr, "Warning: " #EXPR "\n"); \ | |
} | |
int main() { | |
int x = 1; | |
WARN_IF(x == 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
#include <stdio.h> | |
struct command { | |
char *name; | |
void (*function)(void); | |
}; | |
#define MKCMD(cmd) { #cmd, cmd ## _command } |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <stdbool.h> | |
struct array { | |
int* data; | |
int* set_list; | |
int* set_pos_list; | |
int set_count; | |
int length; |
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
<html> | |
<body> | |
<div> | |
<a href="example.com/123123213/123123">first example</a> | |
<a href="another link">2nd example</a> | |
<a href="this-is-the-2nd-example.com">third example</a> | |
<a href="example/asdasd/bbb">another example</a> | |
</div> | |
</body> |
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
trait IProcessor<'a> { | |
fn set_next(&'a mut self, next: &'a mut dyn IProcessor<'a>); | |
} | |
struct Processor<'a> { | |
next: Option<&'a mut dyn IProcessor<'a>>, | |
} | |
impl<'a> IProcessor<'a> for Processor<'a> { | |
fn set_next(&'a mut self, next: &'a mut dyn IProcessor<'a>) { |
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(req) { | |
try { | |
const url = new URL(req.url); | |
const splitted = url.pathname.replace(/^\/*/, '').split('/'); | |
const address = splitted[0]; | |
url.pathname = splitted.slice(1).join('/'); | |
url.hostname = address; | |
url.protocol = 'https'; | |
return fetch(new Request(url, req)); |
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
macro(compile_proc) | |
set(options) | |
set(oneValueArgs ARG) | |
set(multiValueArgs FILES) | |
cmake_parse_arguments(ARGUMENT "${options}" "${oneValueArgs}" "${multiValueArgs}" "${ARGN}") | |
foreach(procfile ${ARGUMENT_FILES}) | |
add_custom_command( | |
OUTPUT ${procfile}.cpp | |
COMMAND |
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 | |
set -e | |
data=$(curl https://raw.githubusercontent.com/soroushmirzaei/telegram-configs-collector/main/splitted/mixed 2>/dev/null) | |
echo $data | base64 -d | while IFS= read -r line; do | |
if [[ "$line" != "trojan"* && "$line" != "vmess"* ]]; then | |
port=$(echo $line | cut -d '@' -f2 | cut -d'#' -f1 | cut -d '?' -f1 | cut -d ':' -f2) | |
if [[ "$port" == "443" ]]; then |
OlderNewer