Skip to content

Instantly share code, notes, and snippets.

.
├── books
│   ├── handlers.go
│   └── models.go
├── config
│   └── db.go
└── main.go
@netgfx
netgfx / App.tsx
Created August 20, 2021 21:47
complete-framer+supabase
import { ComponentType, useEffect } from "react"
import { createStore } from "https://framer.com/m/framer/store.js@^1.0.0"
import { randomColor } from "https://framer.com/m/framer/utils.js@^0.9.0"
import { createClient } from "https://cdn.skypack.dev/@supabase/supabase-js"
import { md5 } from "https://cdn.skypack.dev/pure-md5"
import { browser, checkUsername, checkPassword, useStore } from "./globals.ts"
// Learn more: https://www.framer.com/docs/guides/overrides/
export function initDB(Component): ComponentType {
@gabbhack
gabbhack / main.py
Created October 20, 2019 10:26
aiogram i18n example
from pathlib import Path
from typing import Tuple, Any
from aiogram import Bot, Dispatcher, executor, types
from aiogram.contrib.middlewares.i18n import I18nMiddleware
TOKEN = "TOKEN"
I18N_DOMAIN = "mybot"
BASE_DIR = Path(__file__).parent
@coopbri
coopbri / raspi_unattended.md
Last active April 26, 2024 13:17
Automatically update packages on Raspberry Pi OS (most recent version checked: August 2020)
  1. Install unattended-upgrades package:

     # apt install unattended-upgrades
  2. Add Raspberry Pi Foundation sources to unattended-upgrades config:

     # /etc/apt/apt.conf.d/50unattended-upgrades
     
    

Unattended-Upgrade::Origins-Pattern {

@leocomelli
leocomelli / git.md
Last active April 26, 2024 13:14
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@emrekgn
emrekgn / isimler
Last active April 26, 2024 13:14
Türkçe İsim Listesi
JALE
ALİ
MAHMUT
MANSUR KÜRŞAD
GAMZE
MİRAÇ
YÜCEL
KUBİLAY
HAYATİ
BEDRİYE MÜGE
@Sh4yy
Sh4yy / clx.go
Created April 25, 2024 20:39
Generate CLI commands for common tasks.
package main
import (
"context"
"errors"
"fmt"
"io"
"log"
"os"
"runtime"
@Dlfaith
Dlfaith / gist:0d43be3dfb296bb6260af75ef082faa8
Created December 6, 2022 02:51
Free Windows Server 2022 Product Key
Free Windows Server 2022 Standard Product Key
HP9DJ-NK2X6-4QPCH-8HY8H-6X2XY
RRNMT-FP29D-CHKCH-GWQP2-DDDVB
44QN4-X3R72-9X3VK-3DWD6-HFWDM
Free Windows Server 2022 Datacenter Product Key
WX4NM-KYWYW-QJJR4-XV3QB-6VM33
Download windows Sever 2022 Evaluation edition:
Windows Server 2022 Evaluation English
@Paraphraser
Paraphraser / Mount Raspberry Pi home directory on your Mac.md
Last active April 26, 2024 13:10
Using SSHFS to mount your Raspberry Pi's home directory on your Mac

Using SSHFS to mount your Raspberry Pi's home directory on your Mac

It is useful to be able to mount your Raspberry Pi's file system on your Mac's desktop. The Raspberry Pi is ready to rock-'n-roll but some work needs to be done on the Mac. This gist assumes macOS Mojave 10.14. Your mileage may vary on earlier or later versions.

Set up passwordless SSH (optional)

You can make your life quite a bit simpler if you set up SSH on your Mac so that it can login to your Raspberry Pi without needing a password. Follow this tutorial.

The tutorial assumes two Raspberry Pis but there is no difference in approach if you use a Mac and a Pi, or two Macs.

@dhh
dhh / linux-setup.sh
Last active April 26, 2024 13:10
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl docker.io \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils