Skip to content

Instantly share code, notes, and snippets.

View patrykjadamczyk's full-sized avatar
💻
Having fun with Programming

Patryk Adamczyk patrykjadamczyk

💻
Having fun with Programming
View GitHub Profile
@patrykjadamczyk
patrykjadamczyk / brodcastdb__main.go
Created November 20, 2021 18:19
Golang Channels
package brodcastdb
import (
"fmt"
"sync"
)
type ThreadData struct {
// Broadcast channel
broadcastChannel chan interface{}
# Invoke-Expression (&starship init powershell)
# Starship assumes UTF-8
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
function global:prompt {
$env:PWD=Get-Location
$out = $null
# @ makes sure the result is an array even if single or no values are returned
$jobs = @(Get-Job | Where-Object { $_.State -eq 'Running' }).Count
@patrykjadamczyk
patrykjadamczyk / tmux-cheatsheet.markdown
Created September 9, 2019 15:49 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@patrykjadamczyk
patrykjadamczyk / currencies.json
Last active September 4, 2019 11:50 — forked from joseluisq/currencies.json
JSON list of all currency symbols available from the Open Exchange Rates API - https://docs.openexchangerates.org/docs/currencies-json https://openexchangerates.org/api/currencies.json
{
"AED": "United Arab Emirates Dirham",
"AFN": "Afghan Afghani",
"ALL": "Albanian Lek",
"AMD": "Armenian Dram",
"ANG": "Netherlands Antillean Guilder",
"AOA": "Angolan Kwanza",
"ARS": "Argentine Peso",
"AUD": "Australian Dollar",
"AWG": "Aruban Florin",
@patrykjadamczyk
patrykjadamczyk / DateTime.flow.js
Created August 29, 2019 22:52
DateTime MiniLibrary
// @flow
// InstanceOf Operator Type Flow doesn't have.
// What this does? Calls constructor and defines type from it.
export type InstanceOfClassExtractor = <C>(Class<C>) => C;
export type InstanceOf<Cls: Class<any>> = $Call<InstanceOfClassExtractor, Cls>;
export type DateTimeInstance = InstanceOf<Class<DateTime>>;
export type DateString = string;
export type Timestamp = number;
export type DateTimeType = DateString | Timestamp | Date | DateTimeInstance;
@patrykjadamczyk
patrykjadamczyk / new empty git branch.md
Created July 30, 2019 12:27 — forked from ozh/new empty git branch.md
Create a new empty branch in Git
$ git checkout --orphan NEWBRANCH
$ git rm -rf .

--orphan creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry.

You can then start adding files and commit them and they will live in their own branch. If you take a look at the log, you will see that it is isolated from the original log.

@patrykjadamczyk
patrykjadamczyk / gist:8ec7d55b631df09b47934e9f6c6eb1f0
Created July 18, 2019 06:54 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: