Skip to content

Instantly share code, notes, and snippets.

@astuyve
astuyve / deny_snippet.json
Created January 17, 2024 15:00
Deny cloudwatch permissions from Lambda to save money
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
@TheRamsay
TheRamsay / test.py
Last active October 22, 2024 22:19
IZP first project tester
#!/usr/bin/python3
#
# Testy pro 1. IZP projekt [2024]
# Autor: theramsay
# Inspirace https://github.com/JosefKuchar/izp-projekt-1/blob/main/test.py
# Priklady pouziti:
# python3 ./test.py t9search
# python3 ./test.py t9search --bonus 2
#
# Verze: 1.1 - Přidány testy od @toaster pro edge case na max délku řádku
@pesterhazy
pesterhazy / building-sync-systems.md
Last active April 23, 2025 21:52
Building an offline realtime sync engine

So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.

Overview articles

@gullyn
gullyn / flappy.html
Last active January 24, 2025 00:41
Flappy bird in 205 bytes (improved!)
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
@y21
y21 / vm2.js
Last active April 6, 2023 07:16
vm2
const {NodeVM} = require('vm2');
const {isMainThread, Worker, parentPort} = require('worker_threads');
if (isMainThread) {
const worker = new Worker(__filename);
let lastMessage = null;
worker.on('message', () => lastMessage = Date.now());
worker.on('online', () => lastMessage = Date.now());
@gagregrog
gagregrog / github_deploy_keys_with_pm2.md
Last active September 4, 2022 20:15
Using GitHub Deploy Keys with PM2

PM2, EC2, and Github

Set Up Deploy Key on Remote Server

  1. SSH into the target machine
  2. Make a deploy_keys folder and change into it
    1. mkdir ~/.ssh/deploy_keys
    2. cd ~/.ssh/deploy_keys
  3. Create a new key pair
  4. ssh-keygen -t rsa -b 4096 -C "[email protected]"
@IanColdwater
IanColdwater / twittermute.txt
Last active April 14, 2025 16:31
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@ryu1kn
ryu1kn / README.md
Last active March 7, 2025 07:31
Getting GCP access token from a service account key JSON file

Getting GCP access token from a service account key

Use your service account's key JSON file to get an access token to call Google APIs.

Good for seeing how things work, including the creation of JWT token.

To create a JWT token, you can replace create-jwt-token.sh script with tools like step.

If you just want to get an access token for a service account,

@vakila
vakila / SingleArrow.ipynb
Created April 12, 2019 07:23
Anjana Vakil, "The Universe in a Single Arrow", JSHeroes 2019
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chibicode
chibicode / README-Twemoji-React.md
Last active March 24, 2025 01:14
A dead simple React.js Twemoji component.

Twemoji + React

A dead simple React Twemoji component.

Requirements: twemoji

npm install --save twemoji