Skip to content

Instantly share code, notes, and snippets.

View piotros's full-sized avatar
💻

Piotr Baran piotros

💻
View GitHub Profile
@piotros
piotros / goldbach.js
Created March 22, 2024 13:44 — forked from ihercowitz/golsbach.js
Goldbach's conjecture
/* Goldbach's conjecture in JavaScript
*
* author: Igor Hercowitz
*/
function isPrime(n) {
if (n % 2 === 0) return false;
var sqrtn = Math.sqrt(n)+1;
@piotros
piotros / sls-aws-sso.md
Created February 16, 2024 09:22 — forked from albankora/sls-aws-sso.md
Serverless Framework with AWS SSO

Edit config file

vim ~/.aws/config

The config file structure example

[profile dev]
sso_session = dev
sso_account_id = XXXXXXXXXXXX
@piotros
piotros / README.md
Created September 15, 2023 08:04 — forked from atenni/README.md
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.

Solution:

To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/

To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]

@piotros
piotros / README.md
Last active September 25, 2019 10:37 — forked from emilio-martinez/README.md

Basic npx script template.