Skip to content

Instantly share code, notes, and snippets.

@chase-lambert
chase-lambert / chatgpt-cli.clj
Last active June 7, 2023 08:35
chatGPT API cli
#!/usr/bin/env bb
;; You need to have an OpenAI API key and set it like:
;; export OPENAI_API_KEY=<your key> in your .bashrc
;;
;; Make sure you have babashka installed
;; https://github.com/babashka/babashka#installation
;;
;; One way to run this is to install bbin
;; https://github.com/babashka/bbin
@joelonsql
joelonsql / PostgreSQL-EXTENSIONs.md
Last active February 26, 2025 08:12
1000+ PostgreSQL EXTENSIONs

🗺🐘 1000+ PostgreSQL EXTENSIONs

This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.

⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.

@jlyonsmith
jlyonsmith / Mac Keyboard Symbols.md
Last active February 22, 2025 18:33 — forked from Zenexer/Mac Keyboard Symbols.md
List of Mac/Apple keyboard symbols

Common symbols

Modifiers

When a key combination is displayed, the modifiers are written in the order presented here. For example, Control + Option + Shift + Command + Q would be written as ⌃⌥⇧⌘Q.

Sym Key Alt
Control
Option

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
import React from "react";
import { StyleSheet, Text, View } from "react-native";
import SphericalMercator from "@mapbox/sphericalmercator";
import { MapView, Constants } from "expo";
const merc = new SphericalMercator();
const getZoomLevelFromRegion = (region, viewport) => {
const { longitudeDelta } = region;
const { width } = viewport;
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active February 26, 2025 21:14
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@ingenieroariel
ingenieroariel / multipleservice.input.xml
Last active August 23, 2016 18:07
CSW transactions
<?xml version="1.0" encoding="UTF-8"?>
<csw:Transaction xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-publication.xsd" service="CSW" version="2.0.2">
<csw:Insert>
<csw:Record xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
xmlns:ows="http://www.opengis.net/ows"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dct="http://purl.org/dc/terms/"
xmlns:registry="http://github.com/cga-harvard/HHypermap">
<dc:identifier>urn:uuid:19887a8a-f6b-4a63-ae56-7fba0e17801f</dc:identifier>
<dc:type>http://purl.org/dc/dcmitype/Image</dc:type>
<csw:Record xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dct="http://purl.org/dc/terms/" xmlns:ows="http://www.opengis.net/ows">
<dc:identifier>637</dc:identifier>
<dc:title>Assessed Primary Routes</dc:title>
<dct:alternative>0</dct:alternative>
<dct:modified>2016-08-02T16:18:02Z</dct:modified>
<dct:abstract/>
<dc:type>dataset</dc:type>
<dc:format>OGC:WMS</dc:format>
<dc:source>http://ngamaps.geointapps.org/arcgis/services/NEPAL/NGA_routes/MapServer/WMSServer?</dc:source>
<dc:relation>137</dc:relation>
@cbednarski
cbednarski / di.fm-playlist.py
Created February 3, 2016 00:13
di.fm iTunes playlist importer
import re
"""
di.fm allows you to download a playlist of all your favorite channels. For some
reason when you open this playlist with iTunes only one of the channels is
added. This script splits the playlist file into many playlist files so you can
easily load all of your favorites into iTunes and enjoy di.fm streaming without
running Flash in your browser.
"""
items = open("di.pls").read().split("File")