Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# This script clones a supabase database without the data & owned by the current user
# Usage: clone_supabase_db.sh <new_db_name> [supabase_db_port]
#
# NOTE: [supabase_db_port] is optional and defaults to '54322'
# NOTE: You may seem some errors in the console. most of the time they are harmless for the purposes of running a test/shadow db.
# As long as you get a new DB with the same schema, you should be good to go.
# create a temp file to store the dump
@jkcorrea
jkcorrea / clone_supabase_db.sh
Created December 21, 2022 15:47
Clone Supabase DB for test/shadow
#!/bin/sh
# This script clones a supabase database without the data & owned by the current user
# Usage: clone_supabase_db.sh <new_db_name> [supabase_db_port]
#
# NOTE: [supabase_db_port] is optional and defaults to '54322'
# NOTE: You may seem some errors in the console. most of the time they are harmless for the purposes of running a test/shadow db.
# As long as you get a new DB with the same schema, you should be good to go.
# create a temp file to store the dump
@jkcorrea
jkcorrea / attestation.txt
Created April 5, 2022 22:39
Attestation
I contributed to the Semaphore Trusted Setup Multi-Party Ceremony.
The following are my contribution signatures:
Circuit: semaphore16
Contributor # 90
Hash: 8d8b7d35 01925fca 821b0438 4cb2972f
a463bab8 97ab759c 49f0d809 b69914d0
2c6a1635 b10ab8a1 e0fa2693 8dbae44f
b70d05a3 ade963ee df5d28d1 d2ed3938
<!-- Add this to the Head section of your super site -->
<script>
// Say we host our Super site in a subdirectory e.g. https://example.com/blog
// We can redirect it properly in Cloudflare Worker, but relative links will break
// So we require some custom code to override absolute href paths & history state changes
if (window.location.origin === 'https://example.com') {
var baseDir = '/blog';
function historyMethodOverride(target, thisArg, argArray) {
// prepend baseDir if it isn't there
@jkcorrea
jkcorrea / will_paginate.rb
Last active August 29, 2015 14:20
Extend will_paginate to work with Materialize
# config/initializers/will_paginate.rb
module WillPaginate
module ActionView
def will_paginate(collection = nil, options = {})
options[:renderer] ||= MaterializeLinkRenderer
super.try :html_safe
end
class MaterializeLinkRenderer < LinkRenderer