Skip to content

Instantly share code, notes, and snippets.

View Kielx's full-sized avatar
🎯
Focusing

Krzysztof Pantak Kielx

🎯
Focusing
View GitHub Profile
@Kielx
Kielx / ZSH_setup.md
Created August 14, 2024 08:17 — forked from minhanhhere/Instruction.md
Customise Your Terminal Using Zsh & powerlevel10k

What we will setup

1. ZSH

ZSH, also called the Z shell, is an extended version of the Bourne Shell (sh), with plenty of new features, and support for plugins and themes.

2. oh-my-zsh

This is a framework for zsh

3. Powerlevel 10k

Powerlevel10k is a theme for Zsh. It emphasizes speed, flexibility and out-of-the-box experience.

@Kielx
Kielx / windows event logs cheat sheet
Created May 13, 2024 11:10 — forked from githubfoam/windows event logs cheat sheet
windows event logs cheat sheet
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# PS : ChatGPT makes mistakes, consider "trust but verify" principle
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#Events to Monitor
https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/plan/appendix-l--events-to-monitor
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#run
eventvwr.msc Event viewer
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Event Viewer(Local)-Windows Logs (shutdown / restart )
@Kielx
Kielx / Perceptron.ipynb
Created April 29, 2022 21:21
Simple perceptron able to separate two points using Frank Rosenblatt Algorithm
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Kielx
Kielx / CPP colors
Created May 3, 2021 06:50
c++ terminal output colors
You need the terminal color codes. For linux it's the following (your system might be different, look it up):
//the following are UBUNTU/LINUX, and MacOS ONLY terminal color codes.
#define RESET "\033[0m"
#define BLACK "\033[30m" /* Black */
#define RED "\033[31m" /* Red */
#define GREEN "\033[32m" /* Green */
#define YELLOW "\033[33m" /* Yellow */
#define BLUE "\033[34m" /* Blue */
#define MAGENTA "\033[35m" /* Magenta */
#include <stdio.h>
#include <time.h>
long int fibIt(int n)
//Funkcja oblicza i zwraca okreslony wyraz ciagu Fibonacciego metoda iteracyjna
{
long int i, t1 = 0, t2 = 1, nastepnyWyraz;
for (i = 1; i <= n; ++i)
{

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@Kielx
Kielx / eslint_prettier_airbnb.md
Created October 2, 2020 14:54 — forked from bradtraversy/eslint_prettier_airbnb.md
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@Kielx
Kielx / makeArrayConsecutive.js
Created June 6, 2020 18:26
makeArrayConsecutive scrimba coding challange
// function makeArrayConsecutive returns the number of missing items between smallest
// and largest number in provided array
const makeArrayConsecutive = function (array) {
array.sort((a, b) => a - b);
let myArray = [];
for (i = array[0]; i < array[array.length - 1]; i++) {
myArray.push(i);
}
myArray = myArray.filter(function (el) {
@Kielx
Kielx / evenDigitsOnly.js
Created June 6, 2020 18:22
evenDigitsOnly scrimba coding challange
//function checkIfEven checks if given number consists of only even digits
const checkIfEvenDigit = function (number) {
if (number % 2 === 0) {
return true;
} else {
return false;
}
};
@Kielx
Kielx / sumPrimes.js
Last active June 6, 2020 18:20
sumPrimes scrimba coding challange
//function sumPrimes sums all prime numbers up to the provided number
const isPrime = function (number) {
if (number <= 2) {
return 1;
}
for (let i = 2; i < number; i++) {
if (number % i === 0) {
return 0;
}