Skip to content

Instantly share code, notes, and snippets.

View gotcha's full-sized avatar

Godefroid Chapelle gotcha

View GitHub Profile
@gotcha
gotcha / htmx-patternslib.html
Created September 7, 2023 13:16
HTMX vs Patternslib
<html>
<head>
</head>
<body>
<script src="https://unpkg.com/[email protected]"
integrity="sha384-xcuj3WpfgjlKF+FXhSQFQ0ZNr39ln+hwjN3npfM9VBnUskLolQAcN80McRIVOPuO"
crossorigin="anonymous"></script>
<h1 hx-trigger="load" hx-get="/ul.html" hx-swap="afterend"
hx-select="ul.coll">HTMX</h1>
{
inputs = {
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
devenv.url = "github:cachix/devenv?dir=src/modules";
} // (if builtins.pathExists ./.devenv/devenv.json
then (builtins.fromJSON (builtins.readFile ./.devenv/devenv.json)).inputs
else {});
<plone:behavior
name="plone.testbeh.gotcha"
title="Gotcha"
description="Gotchas"
provides=".behaviour.IGotcha" />
<browser:viewlet
name="plone.logo"
for=".behaviour.IGotcha"
manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
import os
print("Python in WASM with %s is great!" % os.environ.get('PYTHONWHO', 'nobody'))
@gotcha
gotcha / cold-storage.md
Last active June 6, 2017 16:01
Etherwallet cold storage

Go to https://github.com/kvhnuke/etherwallet/releases/latest.

  1. Click on dist-vX.X.X.X.zip.
  2. Move zip to an airgapped computer.
  3. Unzip it and double-click index.html. Note: do not move files around in this folder. You need the entire folder for it to work.
  4. Generate a wallet with a strong password.
  5. Save your wallet file. Without it, you cannot access your account or send your ETH or Tokens.
  6. Save a backup of this wallet to a USB drive
  7. Print a paper backup or hand-write the raw private key paper.
  8. Save the address.
{
"version": "1.0.0",
"summary": "experimental UI to attack Plone through REST and elm",
"repository": "https://github.com/user/project.git",
"license": "BSD3",
"source-directories": [
"."
],
"exposed-modules": [],
"dependencies": {
<object name="ckeditor_properties" meta_type="Plone Property Sheet">
<property name="plugins" type="lines">
<element value="ajaxsave;/++resource++cke_ajaxsave/plugin.js"/>
<element
value="tableresize;/++resource++ckeditor/plugins/tableresize/plugin.js"/>
</property>
</object>
@gotcha
gotcha / gist:9841a3db4946764c84466be313a4011f
Last active August 30, 2016 16:38
Elm accept empty HTTP response with 20x status
postTitle : String -> Model -> Task.Task Http.RawError Http.Response
postTitle url model =
let
token =
case model.token of
Just token ->
token
Nothing ->
""
type alias FieldId = String
type alias Url = String
type alias Flags =
(FieldId, Url)
init : FieldId -> Url -> String
init fieldid url =
if isvalidUrl fieldid then
sync_grains:
salt.function:
- name: saltutil.sync_grains
- tgt: '*'
saltmaster.dev.srv.cirb.lan_master:
----------
ID: sync_grains