Skip to content

Instantly share code, notes, and snippets.

@teafoot
teafoot / patch-notion-enhanced.sh
Created November 4, 2023 15:15 — forked from henfiber/patch-notion-enhanced.sh
patch-notion-enhanced
#!/bin/bash
function check_root() {
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root!" 1>&2
exit 1
fi
}
function help_menu() {

Smettere di credere a chi vi dice che si può diventare bravi programmatori in sei mesi.

Smettere di credere ad ogni post su linkedin.

@teafoot
teafoot / AuthModal.tsx
Created April 2, 2023 00:12 — forked from burakorkmez/AuthModal.tsx
Leetcode Clone
<>
<div className='absolute top-0 left-0 w-full h-full flex items-center justify-center bg-black bg-opacity-60'></div>
<div className='w-full sm:w-[450px] absolute top-[50%] left-[50%] translate-x-[-50%] translate-y-[-50%] flex justify-center items-center'>
<div className='relative w-full h-full mx-auto flex items-center justify-center'>
<div className='bg-white rounded-lg shadow relative w-full bg-gradient-to-b from-brand-orange to-slate-900 mx-6'>
<div className='flex justify-end p-2'>
<button
type='button'
className='bg-transparent rounded-lg text-sm p-1.5 ml-auto inline-flex items-center hover:bg-gray-800 hover:text-white text-white'
>
@teafoot
teafoot / github_bitbucket_multiple_ssh_keys.md
Created September 11, 2022 17:28 — forked from yinzara/github_bitbucket_multiple_ssh_keys.md
Managing SSH keys and repo cloning using multiple accounts on GitHub and BitBucket

Why Multiple SSH keys?

There are numerous reasons you may need to use multiple SSH keys for accessing GitHub and BitBucket

You may use the same computer for work and personal development and need to separate your work.

When acting as a consultant, it is common to have multiple GitHub and/or BitBucket accounts depending on which client you may be working for.

You may have different projects you're working on where you would like to segregate your access.

@teafoot
teafoot / work-with-multiple-github-accounts.md
Created September 11, 2022 17:19 — forked from rahularity/work-with-multiple-github-accounts.md
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@teafoot
teafoot / reset-trial-navicat.sh
Created August 6, 2022 18:01 — forked from nakamuraos/reset-trial-navicat.sh
Reset trial Navicat 15, Navicat 16 on Linux
#!/bin/bash
# Author: NakamuraOS
# https://github.com/nakamuraos
# Latest update: 30/03/2022
# Tested on Navicat 15.x, 16.x on Linux
RED="\e[1;31m"
ENDCOLOR="\e[0m"
@teafoot
teafoot / grokking_to_leetcode.md
Created March 15, 2022 06:29 — forked from tykurtz/grokking_to_leetcode.md
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@teafoot
teafoot / JsonHelper.java
Created October 27, 2021 04:58 — forked from codebutler/JsonHelper.java
Convert Android JSONObject/JSONArray to a standard Map/List.
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.*;
public class JsonHelper {
public static Object toJSON(Object object) throws JSONException {
if (object instanceof Map) {
JSONObject json = new JSONObject();
server {
listen 80;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
server_name example.com;
location / {
try_files $uri $uri/ =404;
}
@teafoot
teafoot / sampleREADME.md
Created March 21, 2020 15:18 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects.

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here