Skip to content

Instantly share code, notes, and snippets.

View guidoschmidt's full-sized avatar

Guido Schmidt guidoschmidt

View GitHub Profile
@Quasimondo
Quasimondo / hic_et_nunc_basic_scraper.py
Created March 10, 2021 11:23
This is a very basic no-frills scraper to retrieve the metadata and digital assets from all tokens minted on hicetnunc.xyz. I share this as a starting point for people who want to experiment with building alternative views on the works created on the platform or preserve the data. Feel free to improve upon this or add additional features.
import requests
import os
import ipfsApi
api = ipfsApi.Client(host='https://ipfs.infura.io', port=5001)
url = "https://better-call.dev/v1/contract/mainnet/KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton/tokens"
r = requests.get(url)
data = r.json()
@akihikodaki
akihikodaki / README.en.md
Last active April 20, 2024 02:43
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.
@MasterQ32
MasterQ32 / closure.zig
Last active November 2, 2023 22:19
Zig Closure Implementation
const std = @import("std");
pub fn main() void {
std.log.info("mutable closure:",.{});
runMutDemo();
std.log.info("const closure:",.{});
runConstDemo();
}
@ityonemo
ityonemo / test.md
Last active May 1, 2024 15:37
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@kickbase
kickbase / export_viewport_image.py
Last active February 2, 2024 12:45
[Houdini] [Python] Export viewport image.
from time import gmtime, strftime
cur_desktop = hou.ui.curDesktop()
desktop = cur_desktop.name()
viewer = hou.paneTabType.SceneViewer
panetab = cur_desktop.paneTabOfType(viewer).name()
persp = cur_desktop.paneTabOfType(viewer).curViewport().name()
camera_path = desktop + '.' + panetab + '.' + 'world.' + persp
hn = hou.getenv('HIPNAME')
defaultName = strftime(hn + '%Y%m%d.jpg', gmtime())
// This is a crude implementation of a graphql plugin for kea.
// It needs to be cleaned up, tested and then made into a real plugin.
// There is basic support for subscriptions and reloading.
// Mutations are not implemented
// To use:
// - logicWithGraphQL.values.course == { id: 123, { translations: [...] } }
// - logicWithGraphQL.values.courseVariables == { id: 123 }
import gql from 'graphql-tag'
import { kea } from 'kea'
@danieldogeanu
danieldogeanu / MakePowerShellRememberSSHPassphrase.md
Last active April 23, 2024 12:18
How to make Powershell remember the SSH key passphrase.

You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

  1. Start the ssh-agent from Windows Services:
  • Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window;
  • Find the OpenSSH Authentication Agent in the list and double click on it;
  • In the OpenSSH Authentication Agent Properties window that appears, choose Automatic from the Startup type: dropdown and click Start from Service status:. Make sure it now says Service status: Running.
  1. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
@mattlenz
mattlenz / kirbytext.js
Last active November 21, 2020 19:26
Kirbytext JS parser
const md = require('markdown-it')({
html: true,
linkify: true,
typographer: true,
breaks: true,
})
.use(require('markdown-it-deflist'))
.use(require('markdown-it-footnote'))
function kirbytext(text, page) {
@fnky
fnky / ANSI.md
Last active May 3, 2024 17:31
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@josephg
josephg / README.md
Last active March 7, 2024 06:58
Getting Zig compiling to WASM

In case anyone else wants to play with Zig on webassembly, here's what you need to do to make it work on a mac today.

1. Get LLVM 7 compiled with webassembly support.

You'll need LLVM to output to the WASM target. This has just been added by default in trunk, so if LLVM >7 is available, you might be able to just brew install llvm.

If you have wasm support already you should see:

$ llc --version