Skip to content

Instantly share code, notes, and snippets.

View waldyrious's full-sized avatar

Waldir Pimenta waldyrious

View GitHub Profile
@metasikander
metasikander / NIP-05_Simple_Guide.md
Last active February 13, 2024 20:09
A small minimal guide on setting up NIP-05 identifier on branle/nostr

This is a very basic guide, just to understand what's needed to set it up.
If you have any questions you can find me at https://nostr.com/8355095016fddbe31fcf1453b26f613553e9758cf2263e190eac8fd96a3d3de9

Prerequisite

Setup static file on server

Create a file that resolves to <domain>/.well-known/nostr.json, and fill it out like this (enter the name you want to use, and input your own public key, make sure its the HEX-key):

{
@davestewart
davestewart / workflowy x 2.js
Last active February 20, 2024 16:25
WorkFlowy x 2 - a browser bookmarklet to give you a dual panel WorkFlowy view
javascript:
`
WorkFlowy x 2
=============
- A browser Bookmarklet to give you a dual panel WorkFlowy view
Features / Usage:
@waldyrious
waldyrious / tldr.sh
Last active December 20, 2018 18:10
simple shell client for tldr pages
#!/bin/bash
# shellcheck disable=SC2002
# 1) Put this file into your local clone of git://github.com/tldr-pages/tldr:
# curl -L https://gist.github.com/waldyrious/805d6357fa0b55135354ea4b996e0818/raw/ -o path/to/tldr-repo/tldr.sh
# 2) Mark it as executable:
# chmod +x path/to/tldr-repo/tldr.sh
# 3) symlink it into /usr/local/bin:
# sudo ln -s /absolute/path/to/tldr-repo/tldr.sh /usr/local/bin/tldr
@mwaskom
mwaskom / vernalis.py
Created May 29, 2016 01:00
Colormap with a similar aesthetic to viridis but with a broader luminance range.
from matplotlib.colors import ListedColormap
from numpy import nan, inf
# Used to reconstruct the colormap in viscm
parameters = {'xp': [3.559581561226338, 17.887066941343306, -44.539833643452027, -35.329307327662548, -2.5807693159666485],
'yp': [-7.9678362573099264, -64.766081871344994, -32.529239766081844, 43.201754385964932, 6.359649122807042],
'min_Jp': 2.08370436331,
'max_Jp': 99.3232413179}
@booch
booch / HTML_Templating_Patterns.md
Last active January 8, 2023 03:29
HTML Templating Patterns

HTML Templating Patterns

I've decided to try documenting the different patterns used in HTML templates. By HTML templates, I mean taking some HTML(ish) text, and inserting dynamically-generated content. This templating can take place on the web server or in the browser; the patterns don't usually differ between the two.

Delimited HTML

@Alanaktion
Alanaktion / goog.svg
Created September 16, 2015 22:32
A not-quite-accurate minimal SVG Google logo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Kartones
Kartones / postgres-cheatsheet.md
Last active May 16, 2024 12:40
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active May 13, 2024 23:23
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@lehnerpat
lehnerpat / gh-compare.md
Last active September 3, 2022 04:33
GitHub Compare view

GitHub's compare view is available at:

https://github.com/$USER/$REPO/compare/$REV_A...$REV_B

Naturally, $USER and $REPO are the owner (user/organization) and repository names, respectively.

$REV{A,B} are the two sides of the compare view; they can either be a ref in $USER's repository, i.e. the name of a branch, tag or a commit SHA, or it can be a ref in $OWNER's fork of the repository by using the format $OWNER:$REF.

You can get a diff or patch for the result of the compare view by appending .diff or .patch to the URL, respectively.