Skip to content

Instantly share code, notes, and snippets.

fiatjaf fiatjaf

Block or report user

Report or block fiatjaf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View lnurl-withdraw-flow.txt
+----------------------------+ +--------------------+
|server | |wallet |
+----------------------------+ +--------------------+
is listening at
https://x.com/.
user visits site,
has some balance to
withdraw.
@fiatjaf
fiatjaf / .gitignore
Last active Apr 6, 2019
hsm_secret and custom invoices with lnurl on c-lightning
View .gitignore
venv
*.swo
*.swp
__pycache__
@fiatjaf
fiatjaf / README.md
Last active Apr 27, 2019
etleneum htlc contract
View README.md

A contract that can handle multiple "HTLCs" -- in the sense that these are just values parked at the contract that can be claimed by anyone with the correct preimage during some time. After the expiration time they can then be claimed by another different preimage.


Interface


  • method: open
View providers.js
export const providers = {
alias: {
desc: 'Alias for a existing remote',
options: [
{
name: 'remote',
desc:
'Remote or path to alias.\nCan be "myremote:path/to/dir", "myremote:bucket", "myremote:" or "/local/path".',
required: true
}
View aposta.txt
31/12/2022
1. homicídios por ano
2. mulheres mortas pelos companheiros
3. fim do foro privilegiado
4. desemprego
5. pib
6. inflação
7. taxa de desmatamento
8. estupros
@fiatjaf
fiatjaf / check_sig.go
Last active Jul 31, 2019 — forked from lsowen/check_sig.go
GPG signature verification in Go with a bunch of strings
View check_sig.go
package main [33/492]
import (
"fmt"
"strings"
"golang.org/x/crypto/openpgp"
)
func main() {
@fiatjaf
fiatjaf / dl.css
Created Aug 29, 2017
basic CSS for useful description lists
View dl.css
dt {
font-weight: bold;
float: left;
min-width: 200px;
text-align: right;
}
dt:after {
content: ':';
margin-right: 10px;
@fiatjaf
fiatjaf / main.js
Last active May 31, 2017
idea of a framework that takes the best of Cycle, React and Mobx
View main.js
window.xtend = require('xtend')
const {h, run, reactive, track, select} = require('.')
var state = reactive({
name: select('.name-type')
.events('change')
.map(e => e.target.value),
desc: select('.desc-type')
.events('change')
.map(e => e.target.value)
@fiatjaf
fiatjaf / README.md
Created Oct 12, 2016
simple raw webrtc data connection between two peers with a super-small websocket server
View README.md

TO RUN

  1. Modify app.js to use the address of your websocket server instead of ws://ws-server:8088.
  2. Run the websocket server: node ws-server.js
  3. Run an HTTP static file server of your choice: python3 -m http.server 8080
  4. Visit index.html or your HTTP static file server root. Do this on 2 different computers or 2 tabs on the same computer.
  5. The screen is blank. Open the Javascript console and set values for me and other. Do the same on the other computer/tab (but inverting the values this time). Then call connect. After the connection is established you'll be able to call channel.send('message') and see the event logs at the other computer/tab.
View cloudwatch-alarm-to-pushbullet.jq
# POST https://api.pushbullet.com/v2/pushes
# requires 'Access-Token' header
{
device_iden: "<pushbullet device id>",
type: "note",
title: "\(.Message | fromjson | .NewStateValue): \(.Message | fromjson | .AlarmName)",
body: "\(.Message | fromjson | .AlarmDescription) -- \(.Message | fromjson | .NewStateReason) -- \(.Message | fromjson | .StateChangeTime)"
}
You can’t perform that action at this time.