Skip to content

Instantly share code, notes, and snippets.

View soapdog's full-sized avatar

Andre Alves Garzia soapdog

View GitHub Profile
@soapdog
soapdog / gist:0de210be1eb17341f8604dc2e7275d14
Created March 18, 2024 18:34
List of Secure Scuttlebutt Clients
* Patchwork
* Patchbay
* Manyverse
* Patchfoo
* Patchfox
* Planetary
* Oasis
* Tightbean
* Habitat
* Ticktack
@soapdog
soapdog / Kobo Reader Highlights & Annotations
Created January 24, 2024 18:40 — forked from raivivek/Kobo Reader Highlights & Annotations
Kobo eReader - KoboReader.sqlite - SQL statement for listing books, highlights and annotations per chapter
'''''list highlights and annotations by ISBN and book:
select
ISBN, title,
text, annotation
from bookmark
left outer join content
on (content.contentID=bookmark.VolumeID and content.ContentType=6)
where
text is not null;
@soapdog
soapdog / get-tbr.applescript
Created May 13, 2021 17:18
A script to get TBR from The StoryGraph
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
-- pass a string, list, record or number, and either a path to save the result to, or missing value to have it returned as text
-- from: https://forum.latenightsw.com/t/applescript-record-to-json/668/2
on convertASToJSON:someASThing saveTo:posixPath
--convert to JSON data
set {theData, theError} to current application's NSJSONSerialization's dataWithJSONObject:someASThing options:0 |error|:(reference)
if theData is missing value then error (theError's localizedDescription() as text) number -10000
on ssbRoom2Check(cmd)
tell application "Terminal"
activate
delay 1
do script "npx ssb-room2-check " & cmd in front window
end tell
end ssbRoom2Check
display dialog "SSB Room2 Gizmo. What do you want to do?" buttons {"Claim Invite", "Sign In", "Set Alias"}
set cmd to button returned of the result
@soapdog
soapdog / copy-selection-as-html.rkt
Created July 24, 2020 11:32
[ copy selection as html ] a quickscript to copy the selected text as HTML with rainbow parens
#lang at-exp racket/base
(require racket/format
racket/string
syntax-color/racket-lexer
quickscript)
; COPY SELECTION AS HTML
; Author: Andre Alves Garzia ([email protected])
; Date: 07-2020
@soapdog
soapdog / extract-colorscheme-to-package.rkt
Created July 23, 2020 08:24
Creates a new "info.rkt" in the directory of your choosing with the current colorscheme as a new package. // made for Racket Quickscript competition 2020
#lang at-exp racket
(require
framework
framework/preferences
racket/gui
quickscript)
; -----------------------------------------------------------------------
; Extract colorscheme to package.
@soapdog
soapdog / terminal output
Created January 17, 2018 20:08
playing with dex
soapdog@SurfaceFafi:~$ http GET "http://localhost:9898/feed?author=%40goYRRqMFQVWLurlLLL3u3Vc931B4m%2ByV0mfcoDEY7Aw%3D.sha256&limit=2"
HTTP/1.1 200 OK
Connection: close
Content-Length: 2032
Content-type: application/json
Date: Wed, 17 Jan 2018 18:06:09 -0200
Server: Dex Server
[
{
@soapdog
soapdog / test.js
Created January 15, 2018 13:48
example of mutant
var h = require('mutant/html-element')
var Struct = require('mutant/struct')
var send = require('mutant/send')
var computed = require('mutant/computed')
var when = require('mutant/when')
var state = Struct({
text: 'Test',
color: 'red',
value: 0
@soapdog
soapdog / btc.red
Created December 17, 2017 01:15
Calculo de rendimento em BTC na Walltime
Red [
Title: "LuiBTC"
Author: "Andre Garzia"
Needs: 'view
]
do %json.red
view [
title "LuiBTC"
@soapdog
soapdog / elements.js
Created June 19, 2017 21:38
Testing mithril-bulma
import m from "mithril";
import Content from "../elements/content.js";
import Title from "../elements/title.js";
import Subtitle from "../elements/subtitle.js";
import Box from "../elements/box.js";
import Button from "../elements/button.js";
import Tag from "../elements/tag.js";
import Delete from "../elements/delete.js";
import Fa from "../elements/fa.js";
import Icon from "../elements/icon.js";