Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Commit

Permalink
public
Browse files Browse the repository at this point in the history
  • Loading branch information
unixfox committed Aug 6, 2018
0 parents commit 755933d
Show file tree
Hide file tree
Showing 176 changed files with 5,135 additions and 0 deletions.
Binary file added day00/ex01/testDay00.tar
Binary file not shown.
Binary file added day00/ex02/exo2.tar
Binary file not shown.
5 changes: 5 additions & 0 deletions day00/ex03/klist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Credentials cache: API:F1D09C7B-F44D-44F0-9208-63876E53859D
Principal: [email protected]

Issued Expires Principal
Jul 2 14:40:30 2018 Jul 9 14:40:21 2018 krbtgt/[email protected]
1 change: 1 addition & 0 deletions day00/ex04/who_am_i.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ldapwhoami -Q | cut -c 4-
1 change: 1 addition & 0 deletions day00/ex05/people.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ldapsearch -x -LLL "(&(uid=z*))" cn | grep '^cn:' | cut -c 5- | sort -rf
4 changes: 4 additions & 0 deletions day00/ex06/mobile-phone.ldif
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dn:uid=edevos,ou=2018_paris,ou=2018,ou=paris,ou=people,dc=42,dc=fr
changetype: modify
add: mobile
mobile: +32488301232
1 change: 1 addition & 0 deletions day00/ex07/midLS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ls -ptUmd *
1 change: 1 addition & 0 deletions day00/ex08/z
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Z
11 changes: 11 additions & 0 deletions day00/ex09/b
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Episode V, A NEW H0PE It is a period of civil war
Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire.
During the battle, Rebel spies managed to steal secret plans to the Empire's ultimate weapon, the STAR DEATH, an armored space station with enough power to destroy an entire planet.


Pursued by the Empire's sinister agents,
Princess Mehdi races home aboard her starship, custodian of the stolen plans that can save her people and restore the dictatorship to the galaxie..




Binary file added day00/ex10/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions day00/ex10/clean
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
find . \( -name '*~' -o -name '#*#' \) -print -type f -exec rm {} + 2>/dev/null
1 change: 1 addition & 0 deletions day00/ex11/ft_magic
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
42 string 42 42 file
1 change: 1 addition & 0 deletions day01/ex01/print_groups.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
groups $FT_USER | tr ' ' ',' | tr -d '\n'
1 change: 1 addition & 0 deletions day01/ex02/find_sh.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
find * -name "*.sh" -exec basename {} .sh ';'
1 change: 1 addition & 0 deletions day01/ex03/count_files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
find . | wc -l | sed "s/ //g"
1 change: 1 addition & 0 deletions day01/ex04/MAC.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ifconfig | grep ether | cut -c 8- | tr -d ' '
1 change: 1 addition & 0 deletions day01/ex05/"\?$*'KwaMe'*$?\"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
42
1 change: 1 addition & 0 deletions day01/ex06/skip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ls -l | awk 'NR == 1 || NR % 2 == 1'
1 change: 1 addition & 0 deletions day01/ex07/r_dwssap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cat /etc/passwd | grep -v ^# | sed '1d' | awk 'NR % 2 == 1' | grep -Eo '^[^:]+' | rev | sort -r | sed -n ''$FT_LINE1','$FT_LINE2'p;'$(( $FT_LINE2 + 1 ))'q' | tr '\n' ',' | rev | cut -c 2- | rev | sed 's/,/, /g' | awk '{print $0"."}' | tr -d '\n'
1 change: 1 addition & 0 deletions day01/ex08/bon.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ldapsearch -LLLx sn | grep sn | grep -i bon | cut -c 5- | wc -l | cut -c 6-
4 changes: 4 additions & 0 deletions day01/ex09/add_chelou.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FT_NBR1=\\\'\?\"\\\"\'\\/
FT_NBR2=rcrdmddd
#tr '$FT_NBR1' '01
$(( echo '$FT_NBR1' | wc -c ))
25 changes: 25 additions & 0 deletions day02/ex00/ft_print_alphabet.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_print_alphabet.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edevos <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/07/04 12:29:30 by edevos #+# #+# */
/* Updated: 2018/07/08 11:21:12 by edevos ### ########.fr */
/* */
/* ************************************************************************** */

void ft_putchar(char c);

void ft_print_alphabet(void)
{
char a;

a = 97;
while (a <= 122)
{
ft_putchar(a);
a++;
}
}
25 changes: 25 additions & 0 deletions day02/ex01/ft_print_reverse_alphabet.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_print_reverse_alphabet.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edevos <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/07/04 12:29:30 by edevos #+# #+# */
/* Updated: 2018/07/04 17:51:53 by edevos ### ########.fr */
/* */
/* ************************************************************************** */

void ft_putchar(char c);

void ft_print_reverse_alphabet(void)
{
char a;

a = 122;
while (a != 96)
{
ft_putchar(a);
a--;
}
}
25 changes: 25 additions & 0 deletions day02/ex02/ft_print_numbers.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_print_numbers.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edevos <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/07/04 16:37:44 by edevos #+# #+# */
/* Updated: 2018/07/07 19:41:39 by edevos ### ########.fr */
/* */
/* ************************************************************************** */

void ft_putchar(char c);

void ft_print_numbers(void)
{
char c;

c = '0';
while (c <= '9')
{
ft_putchar(c);
c++;
}
}
21 changes: 21 additions & 0 deletions day02/ex03/ft_is_negative.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_is_negative.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edevos <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/07/04 16:00:17 by edevos #+# #+# */
/* Updated: 2018/07/08 08:34:15 by edevos ### ########.fr */
/* */
/* ************************************************************************** */

void ft_putchar(char c);

void ft_is_negative(int n)
{
if (n < 0)
ft_putchar('N');
else
ft_putchar('P');
}
53 changes: 53 additions & 0 deletions day02/ex04/ft_print_comb.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_print_comb.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edevos <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/07/04 17:30:17 by edevos #+# #+# */
/* Updated: 2018/07/08 08:34:19 by edevos ### ########.fr */
/* */
/* ************************************************************************** */

void ft_putchar(char c);

void ft_print(char f, char s, char t)
{
if (f == '7' && s == '8' && t == '9')
{
ft_putchar(f);
ft_putchar(s);
ft_putchar(t);
}
else
{
ft_putchar(f);
ft_putchar(s);
ft_putchar(t);
ft_putchar(',');
ft_putchar(' ');
}
}

void ft_print_comb(void)
{
char first_digit;
char second_digit;
char third_digit;

first_digit = '0' - 1;
while (++first_digit <= '9')
{
second_digit = first_digit;
while (++second_digit <= '9')
{
third_digit = second_digit + 1;
while (third_digit <= '9')
{
ft_print(first_digit, second_digit, third_digit);
third_digit++;
}
}
}
}
64 changes: 64 additions & 0 deletions day02/ex05/ft_print_comb2.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_print_comb2.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edevos <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/07/05 13:25:52 by edevos #+# #+# */
/* Updated: 2018/07/08 11:41:51 by edevos ### ########.fr */
/* */
/* ************************************************************************** */

void ft_putchar(char c);

void ft_print_digit(char fi, char se, char th, char fo)
{
char check_f;
char check_s;

check_f = fi + se;
check_s = th + fo;
if (check_s != check_f)
{
ft_putchar(fi);
ft_putchar(se);
ft_putchar(' ');
ft_putchar(th);
ft_putchar(fo);
if (!(fi == '9' && se == '8' && th == '9' && fo == '9'))
{
ft_putchar(',');
ft_putchar(' ');
}
}
}

void ft_print_comb2(void)
{
char a;
char b;
char c;
char d;

a = '0' - 1;
b = '0' - 1;
c = '0' - 1;
d = '0' - 1;
while (++a <= '9')
{
while (++b <= '8')
{
while (++c <= '9')
{
while (++d <= '9')
{
ft_print_digit(a, b, c, d);
}
d = '0' - 1;
}
c = '0' - 1;
}
b = '0' - 1;
}
}
28 changes: 28 additions & 0 deletions day02/ex06/ft_putnbr.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putnbr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edevos <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/07/05 16:41:15 by edevos #+# #+# */
/* Updated: 2018/07/08 09:22:03 by edevos ### ########.fr */
/* */
/* ************************************************************************** */

#include <unistd.h>

void ft_putchar(char c)
{
write(1, &c, 1);
}

void ft_putnbr(int nb)
{
ft_putchar(nb);
}
int main(void)
{
ft_putnbr(4);
return 0;
}
58 changes: 58 additions & 0 deletions day02/ex07/ft_print_combn.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_print_combn.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edevos <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/07/05 17:15:17 by edevos #+# #+# */
/* Updated: 2018/07/05 17:20:37 by edevos ### ########.fr */
/* */
/* ************************************************************************** */

#include <unistd.h>

void ft_putchar(char c)
{
write(1, &c, 1);
}

void ft_print(char f, char s, char t)
{
if (f == '7' && s == '8' && t == '9')
{
ft_putchar(f);
ft_putchar(s);
ft_putchar(t);
}
else
{
ft_putchar(f);
ft_putchar(s);
ft_putchar(t);
ft_putchar(',');
ft_putchar(' ');
}
}

void t_print_combn(int nb)
{
char first_digit;
char second_digit;
char third_digit;

first_digit = '0' - 1;
while (++first_digit <= '9')
{
second_digit = first_digit;
while (++second_digit <= '9')
{
third_digit = second_digit + 1;
while (third_digit <= '9')
{
ft_print(first_digit, second_digit, third_digit);
third_digit++;
}
}
}
}
16 changes: 16 additions & 0 deletions day03/ex00/ft_ft.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_ft.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edevos <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/07/05 18:42:28 by edevos #+# #+# */
/* Updated: 2018/07/07 20:05:49 by edevos ### ########.fr */
/* */
/* ************************************************************************** */

void ft_ft(int *nbr)
{
*nbr = 42;
}
16 changes: 16 additions & 0 deletions day03/ex01/ft_ultimate_ft.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_ultimate_ft.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edevos <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/07/05 18:56:05 by edevos #+# #+# */
/* Updated: 2018/07/07 20:06:18 by edevos ### ########.fr */
/* */
/* ************************************************************************** */

void ft_ultimate_ft(int *********nbr)
{
*********nbr = 42;
}
Loading

0 comments on commit 755933d

Please sign in to comment.