Skip to content

Instantly share code, notes, and snippets.

View trepca's full-sized avatar
🔜

Sebastjan Trepca trepca

🔜
  • Slovenia
  • 00:20 (UTC -12:00)
  • X @trepca
View GitHub Profile
@cefstat
cefstat / lion-fullscreen.patch
Created November 10, 2011 19:31
Patch for Emacs fullscreen support under Mac OS X 10.7 (Lion)
=== modified file 'lisp/term/ns-win.el'
--- old/lisp/term/ns-win.el 2011-10-01 20:32:01 +0000
+++ new/lisp/term/ns-win.el 2011-11-10 16:22:51 +0000
@@ -928,6 +928,10 @@
(add-to-list 'frame-creation-function-alist '(ns . x-create-frame-with-faces))
(add-to-list 'window-system-initialization-alist '(ns . ns-initialize-window-system))
+(declare-function ns-toggle-fullscreen-internal "nsfns.m" ())
+(defun ns-toggle-fullscreen ()
+ (interactive)
/* change main font */
body,
html,
div,
textarea {
font-family: Roboto;
}
/* change font for all headings */
@richardkiss
richardkiss / settlement_payments.md
Last active November 5, 2023 09:40
Ideas about Offers on Chia

We introduce a new puzzle, "settlement_payments", which pays out coins and make an announcement for each new coin created.

settlement_payments.cl:

(mod (coins_paid)
  ;; `coins_paid` is a list of notarized coin payments
  ;; a notarized coin payment is `(nonce puzzle_hash amount ...)`
  ;; Each notarized coin payment creates a `(CREATE_COIN puzzle_hash amount)` payment
@greimela
greimela / index.html
Created January 19, 2024 11:39
Minimal Chia WalletConnect implementation
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Chia WalletConnect Demo</title>
</head>
<body>
<div>
<button id="connect-button">Connect Wallet</button>
@trepca
trepca / smart_coin.py
Last active March 18, 2024 11:46
Minimal smart coin example on Chia blockchain
import time
from chia.clvm.spend_sim import SimClient, SpendSim
from chia.types.blockchain_format.program import Program
from chia.types.coin_spend import make_spend
from chia.types.condition_opcodes import ConditionOpcode
from chia.types.mempool_inclusion_status import MempoolInclusionStatus
from chia.util.hash import std_hash
from chia.util.ints import uint64
from chia_rs import CoinSpend, G2Element, SpendBundle