Skip to content

Instantly share code, notes, and snippets.

View sitek94's full-sized avatar

Maciek Sitkowski sitek94

View GitHub Profile
@OnesimusUnbound
OnesimusUnbound / quote.txt
Last active August 16, 2023 16:24
Programming Quotes
[T]he difference between a bad programmer and a
good one is whether he considers his code or his
data structures more important. Bad programmers
worry about the code. Good programmers worry about
data structures and their relationships.
-- Linus Torvalds
~~~
Clarity and brevity sometimes are at odds.
When they are, I choose clarity.
-- Jacob Kaplan-Moss
@bitsurgeon
bitsurgeon / youtube.md
Last active June 20, 2024 13:20
Markdown cheatsheet for YouTube

Embed YouTube Video in Markdown File

  1. Markdown style
[![Watch the video](https://img.youtube.com/vi/nTQUwghvy5Q/default.jpg)](https://youtu.be/nTQUwghvy5Q)
  1. HTML style
<a href="http://www.youtube.com/watch?feature=player_embedded&v=nTQUwghvy5Q" target="_blank">

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active July 6, 2024 07:04
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

import React from "react";
import { Link } from "react-router-dom";
export function createResource(getPromise) {
let cache = {};
let inflight = {};
let errors = {};
function load(key) {
inflight[key] = getPromise(key)
@KolbySisk
KolbySisk / slightly-complex-form.jsx
Last active February 2, 2022 05:33
Slightly Complex Form
import { useState } from "react";
export default function SlightlyComplexForm() {
const [urlVisible, setUrlVisible] = useState(false);
const handleSubmit = async (event) => {
// Same as before
};
const handleEmailChange = (event) => {
@mickaelperrin
mickaelperrin / .skhdrc
Last active March 27, 2023 11:09
Yabai configuration
#!/usr/bin/env sh
# _ _ _
# | | | | | |
# ___| | _| |__ __| |_ __ ___
# / __| |/ / '_ \ / _` | '__/ __|
# \__ \ <| | | | (_| | | | (__
# |___/_|\_\_| |_|\__,_|_| \___|
#
:: default : yabai -m config active_window_border_color 0x99DD0000