Skip to content

Instantly share code, notes, and snippets.

View sitek94's full-sized avatar

Maciek Sitkowski sitek94

View GitHub Profile
@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
@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) => {
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)
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active November 17, 2024 17:23
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

@bradtraversy
bradtraversy / mongodb_cheat_sheet.md
Last active November 17, 2024 10:01
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@bitsurgeon
bitsurgeon / youtube.md
Last active November 4, 2024 14:16
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">
@OnesimusUnbound
OnesimusUnbound / quote.txt
Last active September 3, 2024 12:53
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