Skip to content

Instantly share code, notes, and snippets.

View kYroL01's full-sized avatar
🥊

Michele Campus kYroL01

🥊
View GitHub Profile
@kYroL01
kYroL01 / curl.md
Last active November 24, 2020 17:21 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@kYroL01
kYroL01 / armstrong_number.c
Last active July 12, 2021 16:39
Armstrong number: An n-digit number equal to the sum of the n-th powers of its digits.
#include <math.h>
int is_armstrong_number(int x)
{
int i = 0, c_pow = 0, sum = 0;
int digit = x;
int module = x;
while(digit != 0) {
digit /= 10;
@kYroL01
kYroL01 / built_strings
Created September 2, 2016 10:52
Given a string, for every char (digit or alphabet) print the string from begin and end of every single element
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
/**
* Given a string, print subsequents for every chars
* i.e D4b = ABCD01234ab
**/
int main()
{
@kYroL01
kYroL01 / the_descent.c
Created August 9, 2016 13:58
Solution for game "The Descent" on CodingGame
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
/**
* The while loop represents the game.
* Each iteration represents a turn of the game
* where you are given inputs (the heights of the mountains)
* and where you have to print an output (the index of the moutain to fire on)
* The inputs you are given are automatically updated according to your last actions.
@kYroL01
kYroL01 / HashTable.cpp
Last active August 29, 2015 14:25 — forked from Karlina-Bytes/HashTable.cpp
Hash Table Example
//*****************************************************************
// HashTable.cpp
// HashTable
//
// Created by Kar Beringer on June 18, 2014.
//
// This header file contains the Hash Table class definition.
// Hash Table array elements consist of Linked List objects.
//*****************************************************************