Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Chapuis committed Sep 12, 2013
0 parents commit 10ff32f
Show file tree
Hide file tree
Showing 247 changed files with 21,969 additions and 0 deletions.
8,998 changes: 8,998 additions & 0 deletions PDFs/J09/contacts_easy-ex02.txt

Large diffs are not rendered by default.

Binary file added PDFs/J09/ex00.pdf
Binary file not shown.
Binary file added PDFs/J09/ex01.pdf
Binary file not shown.
Binary file added PDFs/J09/ex02.pdf
Binary file not shown.
Binary file added PDFs/J09/ex03.pdf
Binary file not shown.
Binary file added PDFs/J09/ex04.pdf
Binary file not shown.
Binary file added PDFs/J09/ex05.pdf
Binary file not shown.
Binary file added PDFs/J09/ex06.pdf
Binary file not shown.
Binary file added PDFs/J09/ex07.pdf
Binary file not shown.
Binary file added PDFs/J09/ex08.pdf
Binary file not shown.
Binary file added PDFs/J09/ex09.pdf
Binary file not shown.
Binary file added PDFs/J09/ex10.pdf
Binary file not shown.
Binary file added PDFs/J09/ex11.pdf
Binary file not shown.
Binary file added PDFs/J09/ex12.pdf
Binary file not shown.
Binary file added PDFs/J09/ex13.pdf
Binary file not shown.
Binary file added PDFs/J09/ex14.pdf
Binary file not shown.
Binary file added PDFs/J09/ex15.pdf
Binary file not shown.
Binary file added PDFs/J09/ex16.pdf
Binary file not shown.
Binary file added PDFs/J09/ex17.pdf
Binary file not shown.
Binary file added PDFs/J09/ex18.pdf
Binary file not shown.
Binary file added PDFs/J09/ex19.pdf
Binary file not shown.
Binary file added PDFs/J09/ex20.pdf
Binary file not shown.
Binary file added PDFs/J09/ex21.pdf
Binary file not shown.
Binary file added PDFs/J09/ex22.pdf
Binary file not shown.
Binary file added PDFs/J09/ex23.pdf
Binary file not shown.
Binary file added PDFs/bsq.pdf
Binary file not shown.
Binary file added PDFs/colle00.pdf
Binary file not shown.
Binary file added PDFs/colle01.pdf
Binary file not shown.
Binary file added PDFs/colle02.pdf
Binary file not shown.
Binary file added PDFs/evalexpr.pdf
Binary file not shown.
Binary file added PDFs/j00/.DS_Store
Binary file not shown.
9 changes: 9 additions & 0 deletions PDFs/j00/a.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
STARWARS
Episode IV, A NEW HOPE 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 DEATH STAR,
an armored space station with enough power to destroy an entire planet.

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

Binary file added PDFs/j00/j00.pdf
Binary file not shown.
18 changes: 18 additions & 0 deletions PDFs/j00/sw.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
1,2c1,8
< STARWARS
< Episode IV, A NEW HOPE It is a period of civil war.
---
> 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..
>
4,6d9
< 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 DEATH STAR,
< an armored space station with enough power to destroy an entire planet.
8d10
< Pursued by the Empire's sinister agents, Princess Leia races home aboard her starship, custodian of the stolen plans that can save her people and restore freedom to the galaxy...
Binary file added PDFs/j01.pdf
Binary file not shown.
Binary file added PDFs/j02.pdf
Binary file not shown.
Binary file added PDFs/j03.pdf
Binary file not shown.
Binary file added PDFs/j04.pdf
Binary file not shown.
Binary file added PDFs/j05.pdf
Binary file not shown.
Binary file added PDFs/j06.pdf
Binary file not shown.
Binary file added PDFs/j07.pdf
Binary file not shown.
Binary file added PDFs/j08.pdf
Binary file not shown.
Binary file added PDFs/j10.pdf
Binary file not shown.
Binary file added PDFs/j11.pdf
Binary file not shown.
Binary file added PDFs/j12.pdf
Binary file not shown.
Binary file added PDFs/j13.pdf
Binary file not shown.
Binary file added PDFs/match-nmatch.pdf
Binary file not shown.
Binary file added PDFs/norme42-v1.8.pdf
Binary file not shown.
Binary file added PDFs/sastantua.pdf
Binary file not shown.
Binary file added bsq.pdf
Binary file not shown.
Binary file added colle00.pdf
Binary file not shown.
Binary file added colle01.pdf
Binary file not shown.
Binary file added colle02.pdf
Binary file not shown.
Binary file added evalexpr.pdf
Binary file not shown.
9 changes: 9 additions & 0 deletions j00/a.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
STARWARS
Episode IV, A NEW HOPE 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 DEATH STAR,
an armored space station with enough power to destroy an entire planet.

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

Binary file added j00/ex01/testJour00.tar
Binary file not shown.
Binary file added j00/ex02/exo2.tar
Binary file not shown.
7 changes: 7 additions & 0 deletions j00/ex03/klist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Credentials cache: API:5712:37
Principal: schapuis@42.FR

Issued Expires Principal
Aug 12 14:07:17 2013 Aug 19 14:07:17 2013 krbtgt/42.FR@42.FR
Aug 12 14:37:26 2013 Aug 19 14:07:17 2013 host/vogsphere-frontend-normal-1.42.fr@42.FR
Aug 12 15:06:02 2013 Aug 19 14:07:17 2013 ldap/ldap-proxy.42.fr@42.FR
1 change: 1 addition & 0 deletions j00/ex04/who_am_i.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ldapwhoami | sed 's/dn://'
1 change: 1 addition & 0 deletions j00/ex05/people.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ldapsearch -LLL "objectclass=apple-user" uid | sed -n '/uid:/p' | sed 's/uid: //g' | sort -r -f
4 changes: 4 additions & 0 deletions j00/ex06/mobile-phone.ldif
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dn: uid=schapuis,ou=2013,ou=people,dc=42,dc=fr
changetype: modify
add: mobile-phone
mobile-phone: 0626865506
1 change: 1 addition & 0 deletions j00/ex07/midLS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ls -tF | tr '\r\n' ',' | sed 's/\(.*\),/\1/' | sed 's/*//g'
2 changes: 2 additions & 0 deletions j00/ex08/z
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Z

11 changes: 11 additions & 0 deletions j00/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..




1 change: 1 addition & 0 deletions j00/ex10/clean
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
find . \( -name '*~' -o -name '#*#' \) -print -delete
Binary file added j00/ex11/42
Binary file not shown.
1 change: 1 addition & 0 deletions j00/ex11/ft_magic
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
42 string 42 42 file
Binary file added j00/j00.pdf
Binary file not shown.
18 changes: 18 additions & 0 deletions j00/sw.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
1,2c1,8
< STARWARS
< Episode IV, A NEW HOPE It is a period of civil war.
---
> 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..
>
4,6d9
< 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 DEATH STAR,
< an armored space station with enough power to destroy an entire planet.
8d10
< Pursued by the Empire's sinister agents, Princess Leia races home aboard her starship, custodian of the stolen plans that can save her people and restore freedom to the galaxy...
1 change: 1 addition & 0 deletions j01/ex01/print_groups.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
groups $FT_USER | sed 's/ /,/g' | tr -d '\n'
1 change: 1 addition & 0 deletions j01/ex02/find_sh.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
find . \( -name '*.sh' \) -print | sed 's/\(.*\)\///g' | sed 's/\.sh//g'
1 change: 1 addition & 0 deletions j01/ex03/count_files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
( find . -type d && find . -type f ) | wc -l | sed 's/ //g'
1 change: 1 addition & 0 deletions j01/ex04/MAC.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ifconfig | grep "ether" | sed 's/\(.*\)ether //g'
1 change: 1 addition & 0 deletions j01/ex05/'/-$-'KwaMe'-$-/'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
42
1 change: 1 addition & 0 deletions j01/ex06/skip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ls -l | sed 'n;d'
1 change: 1 addition & 0 deletions j01/ex07/r_dwssap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cat /etc/passwd | sed '/^#/d' | sed -n 'n;p' | sed 's/:\(.*\)//g' | rev | sort -r | awk 'NR >= ENVIRON["FT_LINE1"] && NR <= ENVIRON["FT_LINE2"]' | tr '\n' ' ' | sed 's/ /, /g' | sed 's/\(.*\), /\1./' | tr -d '\n'
1 change: 1 addition & 0 deletions j01/ex08/bon.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ldapsearch -LLL "last-name=*bon*" last-name 2> /dev/null | sed -n '/last-name:/p' | wc -l | sed 's/ //g'
1 change: 1 addition & 0 deletions j01/ex09/add_chelou.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
echo $FT_NBR1 + $FT_NBR2 | sed 's/\\/1/g' | sed 's/?/3/g' | sed 's/!/4/g' | sed "s/\'/0/g" | sed "s/\"/2/g" | tr "mrdoc" "01234" | xargs echo "ibase=5; obase=23;" | bc | tr "0123456789ABC" "gtaio luSnemf"
Binary file added j01/j01.pdf
Binary file not shown.
24 changes: 24 additions & 0 deletions j02/ex00/ft_print_alphabet.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_print_alphabet.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: schapuis <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/08/14 12:33:14 by schapuis #+# #+# */
/* Updated: 2013/08/15 10:51:23 by schapuis ### ########.fr */
/* */
/* ************************************************************************** */
int ft_putchar(char c);

void ft_print_alphabet(void)
{
int letter;

letter = 'a';
while (letter <= 'z')
{
ft_putchar(letter);
letter++;
}
}
35 changes: 35 additions & 0 deletions j02/ex01/ft_print_reverse_alphabet.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_print_reverse_alphabet.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: schapuis <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/08/14 13:56:31 by schapuis #+# #+# */
/* Updated: 2013/08/16 10:26:22 by schapuis ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>

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

void ft_print_reverse_alphabet(void)
{
int letter;

letter = 'z';
while (letter >= 'a')
{
ft_putchar(letter);
letter--;
}
}

int main()
{
ft_print_reverse_alphabet();
return (0);
}
24 changes: 24 additions & 0 deletions j02/ex02/ft_print_numbers.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_print_numbers.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: schapuis <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/08/14 14:24:24 by schapuis #+# #+# */
/* Updated: 2013/08/15 10:52:46 by schapuis ### ########.fr */
/* */
/* ************************************************************************** */
int ft_putchar(char c);

void ft_print_numbers(void)
{
char number;

number = 48;
while (number <= 57)
{
ft_putchar(number);
number++;
}
}
24 changes: 24 additions & 0 deletions j02/ex03/ft_is_negative.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_is_negative.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: schapuis <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/08/14 14:35:31 by schapuis #+# #+# */
/* Updated: 2013/08/15 10:54:09 by schapuis ### ########.fr */
/* */
/* ************************************************************************** */
int ft_putchar(char c);

void ft_is_negative(int n)
{
if (n < 0)
{
ft_putchar('N');
}
else
{
ft_putchar('P');
}
}
41 changes: 41 additions & 0 deletions j02/ex04/ft_print_comb.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_print_comb.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: schapuis <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/08/14 14:43:44 by schapuis #+# #+# */
/* Updated: 2013/08/15 10:55:45 by schapuis ### ########.fr */
/* */
/* ************************************************************************** */
int ft_putchar(char c);

void ft_print_comb(void)
{
int numbers[3] = {48, 48, 48};

while (numbers[0] <= 57)
{
if ((numbers[0] < numbers[1]) && (numbers[1] < numbers[2]))
{
ft_putchar(numbers[0]);
ft_putchar(numbers[1]);
ft_putchar(numbers[2]);
if (numbers[0] != 55)
ft_putchar(',');
if (numbers[0] != 55)
ft_putchar(' ');
}
if (numbers[2]++ >= 57)
{
numbers[2] = 48;
numbers[1]++;
}
if (numbers[1] == 58)
{
numbers[1] = 48;
numbers[0]++;
}
}
}
41 changes: 41 additions & 0 deletions j02/ex05/ft_print_comb2.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: schapuis <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/08/14 20:58:30 by schapuis #+# #+# */
/* Updated: 2013/08/15 17:15:16 by schapuis ### ########.fr */
/* */
/* ************************************************************************** */
int ft_putchar(char c);

void ft_print_comb2(void)
{
char table[4] = {0, 0, 0, 1};

while (!((table[0] == 9) && (table[1] == 9)))
{
ft_putchar(table[0] + 48);
ft_putchar(table[1] + 48);
ft_putchar(' ');
ft_putchar(table[2] + 48);
ft_putchar(table[3] + 48);
if (!((table[0] == 9) && (table[1] == 8)))
ft_putchar(',');
if (!((table[0] == 9) && (table[1] == 8)))
ft_putchar(' ');
table[3]++;
if ((table[3] = table[3] % 10) == 0)
table[2] = (table[2] + 1);
if (table[2] == 10)
{
table[2] = table[0];
table[1]++;
if (( table[1] = table[1] % 10) == 0)
table[0]++;
table[3] = table[1] + 1;
}
}
}
35 changes: 35 additions & 0 deletions j02/ex06/ft_putnbr.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putnbr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: schapuis <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/08/15 20:24:40 by schapuis #+# #+# */
/* Updated: 2013/08/15 21:32:13 by schapuis ### ########.fr */
/* */
/* ************************************************************************** */
int ft_putchar(char c);

void ft_putnbr(int nb)
{
int temp;
int size;

size = 1;
if (nb < 0)
{
ft_putchar('-');
nb = -nb;
}
temp = nb;
while ((temp /= 10) > 0)
size *= 10;
temp = nb;
while (size)
{
ft_putchar((char)((temp / size)) + 48);
temp %= size;
size /= 10;
}
}
Binary file added j02/j02.pdf
Binary file not shown.
15 changes: 15 additions & 0 deletions j03/ex00/ft_ft.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_ft.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: schapuis <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/08/15 11:28:16 by schapuis #+# #+# */
/* Updated: 2013/08/15 12:33:19 by schapuis ### ########.fr */
/* */
/* ************************************************************************** */
void ft_ft(int *nbr)
{
*nbr = 42;
}
15 changes: 15 additions & 0 deletions j03/ex01/ft_ultimate_ft.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_ultimate_ft.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: schapuis <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/08/15 12:36:05 by schapuis #+# #+# */
/* Updated: 2013/08/16 12:27:35 by schapuis ### ########.fr */
/* */
/* ************************************************************************** */
void ft_ultimate_ft(int *********nbr)
{
*********nbr = 42;
}
16 changes: 16 additions & 0 deletions j03/ex02/ft_div_mod.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_div_mod.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: schapuis <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/08/15 12:49:24 by schapuis #+# #+# */
/* Updated: 2013/08/15 13:14:01 by schapuis ### ########.fr */
/* */
/* ************************************************************************** */
void ft_div_mod(int a, int b, int *div, int *mod)
{
*div = a / b;
*mod = a % b;
}
Loading

0 comments on commit 10ff32f

Please sign in to comment.