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
/* | |
Thanks to tliangso | |
to test | |
1. run `./a.out 8080` | |
2. use netcat run `nc 127.0.0.1 8080` | |
*/ | |
#include <errno.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <netdb.h> |
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
const axios = require("axios"); | |
// Setup | |
const xkey = ''; // add your credential | |
const token = ''; // add your credential | |
const baseUrl = 'https://api.fbw.center/index.php/v4'; | |
const teamId = ''; | |
const headers = { | |
'x-api-key': xkey, | |
'Authorization': `Bearer ${token}`, |
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 <string.h> | |
#include <unistd.h> | |
#include <sys/wait.h> | |
static void perr(char *s) { | |
while (*s) | |
write(2, s++, 1); | |
} | |
static int cd(char **argv, int i) { |
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
Minishell test script | |
. | |
.**+**+=:. | |
*#********+=:.. | |
:+**=:+###***++********+-. | |
=***###%#%##****++*********+: | |
-****###%%%%###******+*********+. | |
.+#***###%%%%%%#%%#****************=. | |
.++#***%#*#%%%%%#######****************: |
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 <stdarg.h> | |
#include <unistd.h> | |
static int ft_put_base(int nb, char *range, int base, int *len) | |
{ | |
if (nb < 0 && ++(*len)) | |
return (write(1, "-", 1), ft_put_base(-nb, "0123456789", 10, len)); | |
if (nb >= base) | |
ft_put_base(nb / base, range, base, len); | |
return (write(1, &range[nb % base], 1), ++(*len)); |
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 <unistd.h> | |
char *get_next_line(int fd) | |
{ | |
if (BUFFER_SIZE < 1 || fd < 0 || read(fd, NULL, 0) < 0) { return (NULL); } | |
char *line = malloc(100000), *buf = line; | |
while (read(fd, buf, 1) > 0 && *buf++ != '\n'); | |
return (buf > line) ? (*buf = 0, line) : (free(line), NULL); | |
} |
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
#!/bin/bash | |
## Setup | |
FILE="checker" | |
## Constant Variable | |
GREEN="\033[1;32m" | |
GRAY="\033[1;37m" | |
CYAN="\033[1;36m" | |
BLUE="\033[1;34m" | |
YELLOW="\033[1;33m" |
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
#!/bin/bash | |
## Setup | |
FILE="push_swap" | |
## Constant Variable | |
GREEN="\033[1;32m" | |
GRAY="\033[1;37m" | |
CYAN="\033[1;36m" | |
BLUE="\033[1;34m" | |
YELLOW="\033[1;33m" |
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
#!/bin/bash | |
## Setup | |
FILE="push_swap" | |
## Constant Variable | |
GREEN="\033[1;32m" | |
GRAY="\033[1;37m" | |
CYAN="\033[1;36m" | |
BLUE="\033[1;34m" | |
YELLOW="\033[1;33m" |
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
## Get starting use git | |
# create git from empty | |
git init | |
# download project into your directory | |
git clone <url> | |
git clone <url> <dirname> #rename default project as you wish | |
## STATUS | |
# Check your git status |
NewerOlder