Skip to content

Instantly share code, notes, and snippets.

View piotrlewandowski's full-sized avatar
💪
Focusing

Piotr Lewandowski piotrlewandowski

💪
Focusing
View GitHub Profile
@piotrlewandowski
piotrlewandowski / languages-that-compile-to-js.md
Created September 3, 2023 16:00 — forked from matthiasak/languages-that-compile-to-js.md
Languages that compile to JS (from CoffeeScript wiki)

CoffeeScript Family (& Friends)

Family (share genes with CoffeeScript)
  • Coco A CoffeeScript dialect that aims to be more radical and practical, also acts as a test bed for features that get imported in CoffeeScript.
    • LiveScript is a fork of Coco that is much more compatible with CoffeeScript, more functional, and with more features.
  • IcedCoffeeScript A CoffeeScript dialect that adds support for await and defer keywords which simplify async control flow.
@piotrlewandowski
piotrlewandowski / react-portals
Created March 19, 2023 20:15
TestDome React Test 2 - portals
class Tooltip extends React.Component {
render() {
const { text, tooltipId } = this.props;
return ReactDOM.createPortal(text, document.getElementById(tooltipId));
}
}
export class App extends React.Component {
state = {
text: '',
@piotrlewandowski
piotrlewandowski / torrents.md
Created September 25, 2022 17:48 — forked from shmup/torrents.md
transmission blocklist guide

Transmission Blocklist

The Transmission torrent client has an option to set a Blocklist, which helps protect you from getting caught and having the DMCA send a letter/email.

It's as simple as downloading and installing the latest client:

@piotrlewandowski
piotrlewandowski / docker-compose.yml
Created August 1, 2022 15:08
MongoDB running on a Docker container
version: "3.9"
services:
mongodb:
image : mongo
container_name: mongodb
environment:
- MONGO_INITDB_ROOT_USERNAME=username
- MONGO_INITDB_ROOT_PASSWORD=password
volumes:
- .docker/mongodb/database:/data/db
@piotrlewandowski
piotrlewandowski / middleware.ts
Created July 19, 2022 12:15 — forked from mhaecal/middleware.ts
Protected Routes Middleware NextJS 12
import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'
export function middleware(req: NextRequest) {
// get cookie token
const hasToken = req.cookies.get('token')
// protected routes (admin routes)
if (req.nextUrl.pathname.startsWith('/admin')) {
if (hasToken) {
@piotrlewandowski
piotrlewandowski / AUTHORS.md
Created May 17, 2022 19:28 — forked from juliengdt/AUTHORS.md
AUTHORS.md template

Project Authors

This is where your explain when the project started, for which client, and list all devteams who contributes to it.

Project technical leads:

  • John Foo - position - City (Country)
  • Bar Doe - position - City (Country)
@piotrlewandowski
piotrlewandowski / aliases
Created April 27, 2022 15:39 — forked from quent01/aliases
CMDER aliases configuration
;= @echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto:eof
;= Add aliases below here
;= -----------------------------------------------------
;=
;= $$$$$$\ $$\ $$\ $$$$$$$\ $$$$$$$$\ $$$$$$$\
;= $$ __$$\ $$$\ $$$ |$$ __$$\ $$ _____|$$ __$$\
@piotrlewandowski
piotrlewandowski / c64-logo-rainbow.css
Created October 29, 2021 17:33
Commodore 64 pallete
:root {
--c64-rainbow-red: #D12625;
--c64-rainbow-orange: #DA6141;
--c64-rainbow-yellow: #F1CB28;
--c64-rainbow-green: #4BB249;
--c64-rainbow-blue: #009EDA;
}
@piotrlewandowski
piotrlewandowski / gist:e19841a70d20738254188b5640de75cc
Created October 25, 2021 11:41 — forked from hay/gist:1351230
Enterprisify your Java Class Names!
<!doctype html>
<html>
<head>
<title></title>
<style>
body {
background: white;
text-align: center;
padding: 20px;
font-family: Georgia, serif;
@piotrlewandowski
piotrlewandowski / 149909-playlist_youtube-vlc3patch.lua
Created August 8, 2021 14:05 — forked from seraku24/149909-playlist_youtube-vlc3patch.lua
VLC 3.x compatibility patch for 149909-playlist_youtube.lua
--[[
Youtube playlist importer for VLC media player 1.1 and 2.0
Copyright 2012 Guillaume Le Maout
Authors: Guillaume Le Maout
Contact: http://addons.videolan.org/messages/?action=newmessage&username=exebetche
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or