One of Apexlab's strategic partners, Olvasoegylet.io sent us a request for a book catalog application. They would like to have a public collection of books for their customers. You are the chosen one who may write POC (proof of concept) purely back-end (Node) JavaScript (Typescript) application which they could use to provide data for their various mobile application eg.: Book Renter.
Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Children, | |
cloneElement, | |
createContext, | |
useCallback, | |
useContext, | |
useMemo, | |
useState, | |
} from "react"; | |
import { Slot, SlotProps } from "@radix-ui/react-slot"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var IPV4 = /^(25[0-5]|2[0-4][0-9]|1?[0-9][0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}$/, | |
IPV6 = /^([0-9a-f]){1,4}(:([0-9a-f]){1,4}){7}$/i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scan target for pentest | |
nmap -PN -n -A -sS -p- -oN output.nmap <IP> | |
-Pn : no ping check (host is up), | |
-n no dns resolution | |
-A : detect systeme info | |
-sT : tcp connect [laisse des traces dans les logs serveurs] (moins impactant que -sS Syn, ne laisse pas de trace dans les logs par defaut) | |
-p- : port de 0-65535 | |
-oN output.nmap : write utput to file | |
ajouter un scan udp en parallèle -sU (dns, ipsec ...) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################ | |
############ also be sure to RESTART OpenProject after replacing the file. ################ | |
############ it doesn't show that enterprise mode is enabled in the settings, but all ################ | |
############ enterprise mode features, such as KanBan boards, are enabled. ################ | |
#-- copyright | |
# OpenProject is an open source project management software. | |
# Copyright (C) 2012-2023 the OpenProject GmbH | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License version 3. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Find the latest version of this script here: | |
// https://gist.github.com/rsms/a8ad736ba3d448100577de2b88e826de | |
// | |
const EM = 2048 | |
interface FontInfo { | |
familyName :string | |
styleName :string | |
unitsPerEm :int | |
ascender :int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"context": "Editor && VimControl && !VimWaiting && !menu", | |
"bindings": { | |
"ctrl-w z": "workspace::ToggleZoom", | |
"ctrl-w t": "terminal_panel::ToggleFocus", | |
"g ]": "editor::GoToDiagnostic", | |
"g [": "editor::GoToPrevDiagnostic", | |
"g r": "editor::FindAllReferences", | |
"shift-k": "editor::Hover", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Docker compose to set up containers for all services you need: | |
# VPN | |
# Sonarr, Radarr, Lidarr, Qbittorrent | |
# Non-VPN | |
# Plex, get_iplayer | |
# Before running docker-compose, you should pre-create all of the following folders. | |
# Folders for Docker State: | |
# /volume1/dockerdata. - root where this docker-compose.yml should live | |
# /volume1/dockerdata/plex - Plex config and DB | |
# /volume1/dockerdata/sonarr - Sonarr config and DB |
NewerOlder