Skip to content

Instantly share code, notes, and snippets.

View kuldar's full-sized avatar

Kuldar kuldar

View GitHub Profile
{
"React Component": {
"prefix": "rcc",
"body": [
"const ${1:${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/}} = () => {",
" return (",
" <div>",
" ${2:$1}",
" </div>",
" );",
# documentation: https://twenty.com/developers/section/self-hosting/docker-compose
# slogan: Twenty is a CRM designed to fit your unique business needs.
# tags: crm, self-hosted, dashboard
# logo: svgs/twenty.svg
# port: 3000
services:
change-vol-ownership:
image: ubuntu
user: root

Scraping websites with Supabase

The other day I needed to build a small web scraper to get new listings from a local real-estate website and store them somewhere I could easily fetch them.

Previously I had built a similar solution on a long-running Digital Ocean droplet and stored the listings in a plain JSON file. Obviously that was less than ideal setup, since the server was doing nothing most of the time, and it was a hassle to actually fetch the data.

I decided this was a good chance to get to know Supabase Edge functions a bit better and utilize the Postres pg_cron extension to periodically trigger the function.

Let's get started.

@kuldar
kuldar / OpenGraphHeader.htm
Created December 14, 2017 07:32 — forked from JeremyMorgan/OpenGraphHeader.htm
Template for Open Graph Tags. Adding these to your pages will help you display information better on Google+, Facebook and Twitter. Just replace the values with their own.
<meta itemprop="name" content="[ TITLE ]" />
<meta itemprop="image" content="[ LISTING IMAGE ]" />
<meta itemprop="description" content="[ ARTICLE DESCRIPTION ]" />
<meta name="description" content="[ ARTICLE DESCRIPTION ]" />
<meta name="author" content="[ AUTHOR FULL NAME ]" />
<meta property="article:author" content="[ GOOGLE+ AUTHOR URL ]" />
<meta property="article:published_time" content="[ PUBLISHED TIMESTAMP ]" />
<meta property="article:section" content="[ CATEGORY ]" />
@kuldar
kuldar / kitchensink.html
Last active July 26, 2016 01:13
HTML Kitchensink
<h1>Level 1 heading</h1>
<p>Sed scelerisque sagittis lorem. Phasellus sodales. Nulla urna justo, vehicula in, suscipit nec, molestie sed, tellus.</p>
<h2>Level 02 Heading</h2>
<p>Sed scelerisque sagittis lorem. Phasellus sodales. Nulla urna justo, vehicula in, suscipit nec, molestie sed, tellus.</p>
<h3>Level 03 Heading</h3>
<p>Sed scelerisque sagittis lorem. Phasellus sodales. Nulla urna justo, vehicula in, suscipit nec, molestie sed, tellus.</p>
<h4>Level 04 Heading</h4>
@kuldar
kuldar / content-kitchen-sink.html
Created July 26, 2016 01:07 — forked from jimmynotjim/content-kitchen-sink.html
HTML Kitchen Sink (taken from BlueTrip CSS Framework) includes the major (and minor) HTML tags you might use on any given site.
<h1>Level 1 heading</h1>
<p>Sed scelerisque sagittis lorem. Phasellus sodales. Nulla urna justo, vehicula in, suscipit nec, molestie sed, tellus.</p>
<h1 class="fancy">Level 1 heading class="fancy"</h1>
<p>Sed scelerisque sagittis lorem. Phasellus sodales. Nulla urna justo, vehicula in, suscipit nec, molestie sed, tellus.</p>
<h1 class="thin">Level 1 heading class="thin"</h1>