Skip to content

Instantly share code, notes, and snippets.

View skorotkiewicz's full-sized avatar
💻
\coding/

Sebastian Korotkiewicz skorotkiewicz

💻
\coding/
View GitHub Profile
@skorotkiewicz
skorotkiewicz / multipleParser.js
Last active June 22, 2021 03:01
React Linkify - Simple Create Clickable Hashtags, Mentions etc...
import { createElement } from "react"
export const parser = (text) => {
let hashtag = /(#[\w]+)/g // parse: #test
let user = /(\^[\w]+)/g // parse: ^test
let blog = /(\/s\/[\d]+)/g // parse: /s/123
let url = /(\b(https?):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi
return text.split(hashtag).map((chunk) => {
return chunk.split(user).map((chunk) => {
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
@skorotkiewicz
skorotkiewicz / App.jsx
Created April 22, 2021 13:01
React Keypress Hook
import useKeypress from "./useKeypress";
useKeypress("Escape", () => {
console.log("<kbd>ESC</kbd> pressed")
})
@skorotkiewicz
skorotkiewicz / irc.md
Last active October 13, 2021 01:20 — forked from xero/irc.md
irc cheat sheet

IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
  • Leaves the specified channel.
@skorotkiewicz
skorotkiewicz / imiona.js
Created February 13, 2020 02:49
Tablica dla polskich imion żeńskich i męskich
const menskie = ['Aaron','Abdon','Abel','Abelard','Abraham','Achilles','Adam','Adelard','Adnan','Adrian','Agapit','Agaton','Agrypin','Ajdin','Albert','Alan','Albin','Albrecht','Aleks','Aleksander','Aleksy','Alfons','Alfred','Alojzy','Alwin','Amadeusz','Ambroży','Anastazy','Ananiasz','Anatol','Andrzej','Anioł','Annasz','Antoni','Antonin','Antonius','Anzelm','Apolinary','Apollo','Apoloniusz','Ariel','Arkadiusz','Arkady','Arnold','Aron','Artur','August','Augustyn','Aurelian','Aureliusz','Baldwin','Baltazar','Barabasz','Barnaba','Barnim','Bartłomiej','Bartosz','Bazyli','Beat','Benedykt','Beniamin','Benon','Bernard','Bert','Błażej','Bodosław','Bogdał','Bogdan','Boguchwał','Bogumił','Bogumir','Bogusław','Bogusz','Bolebor','Bolelut','Bolesław','Bonawentura','Bonifacy','Borys','Borysław','Borzywoj','Bożan','Bożidar','Bożydar','Bożimir','Brajan','Bromir','Bronisław','Bruno','Brunon','Budzisław','Cecyl','Cecylian','Celestyn','Cezar','Cezary','Chociemir','Chrystian','Chwalibóg','Chwalimir','Chwalisław','Cichosław','Ciec
@skorotkiewicz
skorotkiewicz / README.md
Last active February 11, 2020 14:56
Simple captcha written in php

Simple captcha written in php

Usage:

if ( implode($_SESSION['captcha']) !== $_POST['captcha'] ) {
	die('Captcha incorrect')
} else {
@skorotkiewicz
skorotkiewicz / imgur-cli.php
Last active January 23, 2020 14:57
A simple and quick way to send a image to Imgur from Terminal. Required php-cli and php-curl.
#!/usr/bin/php
<?php
/**
* Quick info
*
* 1. Replace or use API Key provided by Bart.
* 2. # mv imgur-cli.php imgur
* 3. # chmod +x imgur
* 4. # mv imgur /usr/bin
@skorotkiewicz
skorotkiewicz / README.md
Last active January 22, 2020 23:56
Abfallentsorgungsplan grafischer Kalender Generator in PHP

Abfallentsorgungsplan grafischer Kalender Generator in PHP

Ein einfaches und sehr bequemes Skript, um einen fertigen grafischer Kalender mit Abfallentsorgungsplan zu generieren und ausdrucken.

Jedes Jahr habe ich immer einen solchen Plan erstellt, was ziemlich eintönig und zeitraubend ist. Deshalb habe ich dieses Skript erstellt.

Einfach alle Termine eingeben im Format: TT.MM TT.MM usw.

@skorotkiewicz
skorotkiewicz / vpn.md
Last active February 19, 2021 21:08 — forked from joepie91/vpn.md
Don't use VPN services. (Polska wersja)

Nie korzystaj z usług VPN.

Nie, poważnie, nie. Prawdopodobnie czytasz to, ponieważ spytałeś, z jakiej usługi VPN korzystać i to jest właśnie odpowiedź.

Uwaga: Zawartość tego postu nie ma zastosowania do używania VPN zgodnie z przeznaczeniem, to znaczy jako wirtualna sieć prywatna (wewnętrzna). Dotyczy to tylko używania jej jako proxy, co robi każdy inny "dostawca VPN".

Rosyjskie tłumaczenie tego artykułu można znaleźć tutaj, autorstwa Timura Demina. Jest też ten artykuł o usługach VPN, który jest lepiej napisany (i ma więcej zdjęć kotów!) niż mój artykuł.

Dlaczego nie?