Skip to content

Instantly share code, notes, and snippets.

View astrojarred's full-sized avatar
🌈

Jarred Green astrojarred

🌈
View GitHub Profile
@deehzee
deehzee / psycopg2_sshtunnel.py
Last active September 13, 2023 08:09
How to Connect To PostgreSQL Using SSHTunnelForwarder and Psycopg2
import psycopg2
from sshtunnel import SSHTunnelForwarder
# For interactive work (on ipython) it's easier to work with explicit objects
# instead of contexts.
# Create an SSH tunnel
tunnel = SSHTunnelForwarder(
('128.199.169.188', 22),
ssh_username='<username>',
{{--
Icon view component for Laravel 7.
@disclaimer The icons used in this component are taken from "Refactoring UI Heroicons" (md-outline collection).
For more info https://github.com/refactoringui/heroicons by Steve Schoger & Adam Wathan.
@copyright MIT
@author Maurizio <https://twitter.com/mauriziolepora>
@bmorrisondev
bmorrisondev / notion-sync.py
Created March 2, 2021 22:16
Sync Todoist Tasks to a Notion Database
from notion.client import NotionClient
import requests
import schedule
import time
from datetime import datetime
def get_todoist_tasks():
token = "todoist_token"
headers = {