Skip to content

Instantly share code, notes, and snippets.

@junosuarez
junosuarez / setup.md
Last active December 19, 2022 17:17
how to setup mastodon forwarding from your custom domain using webfinger and github pages

how to setup mastodon forwarding from your custom domain using webfinger and github pages

by @me@juno.lol

tldr

say you have your own domain, cool.example, and you'd rather use very@cool.example as your identity instead of cool23234543@mastodon.social. you can!

prerequisites

I'll assume you already have a repo setup with github pages turned on (or some other static site hosting), and that you already have a mastodon account somewhere.

theory

@androidfred
androidfred / haskell_stack_and_intellij_idea_ide_setup_tutorial_how_to_get_started.md
Last active May 6, 2024 19:13
Haskell, Stack and Intellij IDEA IDE setup tutorial how to get started

Haskell, Stack and Intellij IDEA IDE setup tutorial how to get started

Upon completion you will have a sane, productive Haskell environment adhering to best practices.

Basics

  • Haskell is a programming language.
  • Stack is tool for Haskell projects. (similar tools for other languages include Maven, Gradle, npm, RubyGems etc)
  • Intellij IDEA IDE is a popular IDE.

Install required libraries

sudo apt-get install libtinfo-dev libghc-zlib-dev libghc-zlib-bindings-dev

@cee-dub
cee-dub / postgres_timestamp_defaults.rb
Created January 29, 2012 20:53
Convenient methods to let PostgresQL manage created/updated_at
require 'active_support/core_ext/string/filters'
module PostgresTimestampDefaults
def add_timestamp_defaults(table_name)
add_default_now(table_name, :created_at)
add_default_now(table_name, :updated_at)
add_updated_at_trigger(table_name)
end
def add_default_now(table_name, column_name)
@norman
norman / earthdistance.rb
Last active November 3, 2022 21:20
Geographic Searches With Postgres's Earthdistance and Cube Extensions
#!/usr/bin/env ruby
=begin
= Geographic Searches With Postgres's Earthdistance and Cube Extensions
This program shows how to easily create a Postgres database that uses the Cube
and Earthdistance extensions to perform fast queries on geographic data.
Briefly, the problem this code solves is "show me all places within 50
kilometers of New York City."
@BPScott
BPScott / readme.md
Last active February 7, 2024 16:16
Github suggestion: Per-organization email overrides

This totally happened, y'all can stop +1ing this now. GitHub Blog post. Direct link to settings where you can set this.


#Per-organization / per-repo email overrides - A feature suggestion

Here the concepts "organization" and "user" are interchangeable, I'm talking about an entity that owns a repo, whether it is jQuery or John Resig. I'll stick to using organization as it best represents my original use-case.

##TL;DR