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 / 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
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;
}
@Kielx
Kielx / firstDuplicate
Last active June 6, 2020 18:16
Scrimba coding challanges
//function to find first duplicate in array
function firstDuplicate(nums) {
let MyObj = {}
let myArr = []
for (i=0; i< nums.length ; i++){
for (j=i+1; j< nums.length; j++){
if(nums[i] === nums[j]){
MyObj[nums[i]] = j;
}