Skip to content

Instantly share code, notes, and snippets.

@yclim95
yclim95 / README.md
Last active April 30, 2023 09:01
For Teaching (FrontEnd)

Console (JS)

document.querySelector('img')
const ourImage = document.querySelector('img');
ourImage.setAttribute('src', '');
ourImage.setAttribute('width', '100');
@yclim95
yclim95 / README.md
Created June 15, 2022 00:20
ft_atoi() in c
#include <stdio.h>
#include <stdlib.h>

int	ft_isdigit(int c)
{
	return (c >= '0' && c <= '9');
}

int	ft_atoi(const char *nptr)
@yclim95
yclim95 / README.md
Last active June 10, 2022 03:18
Makefile

Makefile

1. Beginner

1.1. Makefile syntax

targets: prerequisites
	command
	command
@yclim95
yclim95 / README.md
Last active June 6, 2022 00:57
ft_split() in c
#include <stdio.h>
#include <stdlib.h>

static size_t	ft_word_count(char const *s, char c)
{
	size_t count;

	count = 0;
	/*
@yclim95
yclim95 / README.md
Last active June 6, 2022 00:00
ft_itoa() in c
#include <stdio.h>
#include <stdlib.h>

size_t	ft_strlen(const char *s)
{
	size_t	counter;

	counter = 0;
	while(s[counter] != '\0')
@yclim95
yclim95 / README.md
Created May 30, 2022 07:31
ft_striteri() in c
#include <stdio.h>

void	ft_striteri(char *s, void (*f)(unsigned int, char *))
{
	unsigned int	i;

	if (!s || !f)
		return ;
	i = 0;
@yclim95
yclim95 / README.md
Last active May 30, 2022 07:48
ft_strmapi() in c
#include <stdio.h>
#include <stdlib.h>

size_t	ft_strlen(const char *s)
{
	size_t	counter;

	counter = 0;
	while(s[counter] != '\0')
@yclim95
yclim95 / README.md
Last active June 15, 2022 02:22
ft_strtrim() in c
#include <stdio.h>
#include <stdlib.h>

size_t	ft_strlen(const char *s)
{
	size_t	counter;

	counter = 0;
	while(s[counter] != '\0')
@yclim95
yclim95 / README.md
Last active May 30, 2022 02:44
Set Vim Properties

Shell Command

cd ~
mkdir .vim
cd .vim
mkdir colors
cd ~/.vim/colors
curl -o molokai.vim https://raw.githubusercontent.com/tomasr/molokai/master/colors/molokai.vim
@yclim95
yclim95 / README.md
Created May 27, 2022 02:03
ft_strnstrn() in c
#include <stdio.h>

size_t	ft_strlen(const char *s)
{
	size_t	counter;

	counter = 0;
	while(s[counter] != '\0')
		counter++;