Skip to content

Instantly share code, notes, and snippets.

@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@adrianhajdin
adrianhajdin / globals.css
Created May 5, 2023 13:13
Next.js 13 Full Course 2023 | Build and Deploy a Full Stack App Using the Official React Framework
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap");
@tailwind base;
@tailwind components;
@tailwind utilities;
/*
Note: The styles for this gradient grid background is heavily inspired by the creator of this amazing site (https://dub.sh) – all credits go to them!
*/
@stummjr
stummjr / BSTNode.py
Last active April 27, 2024 23:38
BSTNode.py - Binary Search Tree
# -*- encoding:utf-8 -*-
from __future__ import print_function
class BSTNode(object):
def __init__(self, key, value=None, left=None, right=None):
self.key = key
self.value = value
self.left = left
@paulirish
paulirish / what-forces-layout.md
Last active April 27, 2024 23:37
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@digitalsignalperson
digitalsignalperson / tabs.css
Created January 23, 2024 09:18
obsidian tabs in multiple rows
/* --------------compact tabs--------------------*/
.workspace .mod-root .workspace-tab-header {
width: unset;
max-width: var(--tab-width);
border: 1px solid var(--color-base-50);
}
/*.workspace-tab-header-inner {
width: unset;
}*/
@cannikin
cannikin / README.md
Last active April 27, 2024 23:35 — forked from p123ad/README.md
Use Raspberry Pi Camera with Prusa Connect

Use Raspberry Pi and Pi Cam for Prusa Connect

I couldn't get the script from p123ad to work on my Pi Zero W 2 with Camera Module 3 (all kinds of ffmpeg errors). There are several built-in tools for working with the camera now, so I tried to figure out if I could use one of those instead.

Behold this version, which uses the built-in libcamera-still tool to actually interact with the camera and save a JPEG. That image is then uploaded to Prusa Connect, same as the original script.

Instructions

  1. Go to the Cameras section at https://connect.prusa3d.com
  2. Add a new camera "Add new other camera"
@ammarshah
ammarshah / all_email_provider_domains.txt
Last active April 27, 2024 23:32
A list of all email provider domains (free, paid, blacklist etc). Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
0-mail.com
007addict.com
020.co.uk
027168.com
0815.ru
0815.su
0clickemail.com
0sg.net
0wnd.net
0wnd.org
@hmans
hmans / BobTheBuilder.cs
Last active April 27, 2024 23:26
A basic pipeline for performing headless Unity builds for multiple platforms at once.
/* This needs to live in a folder named "Editor", or it won't work. Doesn't have to be named
"BobTheBuilder", though. Name it whatever you want! */
using System;
using UnityEditor;
using UnityEngine;
public class BobTheBuilder
{
/* List of scenes to include in the build */
@mrladeia
mrladeia / readme.md
Last active April 27, 2024 23:26
Iptables to Oracle Cloud port 80 and 443 open

IPTABLES to Oracle Cloud port 80 and 443 open

If you need to open up ports 80 and 443, on file /etc/iptables/rules.v4 just add

-A INPUT -p tcp -m state --state NEW -m multiport --dports 80,443 -j ACCEPT

directly below

@lopezjurip
lopezjurip / Caddyfile
Last active April 27, 2024 23:19
Fix Too Many Redirect error using Caddy + Cloudflare
www.mysite.com, mysite.com {
proxy / webapp:3000 {
proxy_header Host {host}
proxy_header X-Real-IP {remote}
proxy_header X-Forwarded-Proto {scheme}
}
gzip
tls your@email.com
}