Skip to content

Instantly share code, notes, and snippets.

View anjannath's full-sized avatar
🏴‍☠️

Anjan Nath anjannath

🏴‍☠️
  • Red Hat
  • Earth
View GitHub Profile
@anjannath
anjannath / qemu-macos-build.txt
Last active May 13, 2022 04:33
Instructions for building qemu on macOS
install the dependencies as seen on the brew formulae here: https://github.com/Homebrew/homebrew-core/blob/master/Formula/qemu.rb
export LIBRARY_PATH=/tmp/anjan/libs
export CPATH=/tmp/anjan/libs
LDFLAGS=-L/tmp/anjan/libs/lib
CPPFLAGS=-I/tmp/anjan/libs/include
./configure
make install
## Cp out the shared library objects the qemu binary is linked to
otool -L /tmp/anjan/qemu/bin/qemu-system-x86_64 | grep homebrew | awk '{print $1}' | xargs -t -I % cp % /tmp/anjan/qemu/libs/
@anjannath
anjannath / p2p_block_transmit_test.py
Created February 27, 2022 18:19
chaincode academy Bitcoin exercise
#!/usr/bin/env python3
# Copyright (c) 2017-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Block transmit test
This is based on the example_test.py file, here the test tries
to generate a block in node1 send it to node2 and verify that
they received the block
"""
@anjannath
anjannath / crcd-client.go
Created February 14, 2022 09:40
quickly test the crc daemon api on window via namedpipe
package main
import (
"context"
"fmt"
"io/ioutil"
"net"
"net/http"
"os"
"time"
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGHTFp0BEADJMgfiJcxUMgajcNBSXZgWZEiiO/5IVDXjfinwyGe7Fx16uQsE
SYBZTcvn68ZZgKCoFVScsHCEf6lmHwwTW0pXqpVsmcT0ht15jtxDMxTBKQtCT2su
vEzBIH2pNK99vdlIjEMVR9hpYpCHV/MQyuHKib/m7WjW6gtHFjm2IVFCCeqAVXAj
V1HOQD5FBNcQyK+uTyvqqMUdzvPlJqdCxNqLMmeY18AcrpkQyyEWLwym0Yq6qxF0
CKDWeYuBycEIqA9qXD3jWDJBR/cYBFFEakCaa87u3rC3o8TAm+aoV/QJn0/+lRoL
u2WApH8zj8Z64W/sM2ITaAYeLImkArJyruahaitUEYryJg6zImP39K3d9ZyDvsZi
yojBvrNF3AiO8KShPTY6geGgN0oxwDre7ajORfeYe4BWW7yRN/Tlz/hF6gHl+K/M
L0DtT5iiv8TU3kedXsxSaI8djw6X8igYWUftBxGex3VORQGb8evauyIr8wjstbNI
@anjannath
anjannath / README.md
Created December 1, 2021 05:31 — forked from gbraad/README.md
  • slides
    • outline
      • intro
      • problem definition
      • how did you solve it how did you do it
        • swift -> react
          • it is complicated
            • HTML
  • JS (es6)
@anjannath
anjannath / readme.md
Created September 15, 2021 15:49 — forked from guillaumerose/readme.md
Microshift with podman machine

5 minutes to OpenShift on a Mac with podman machine and microshift.

Steps:

  1. brew install podman
  2. podman machine init
  3. podman machine start
  4. podman machine ssh

(in the ssh session)

@anjannath
anjannath / node_description
Last active August 27, 2020 11:11
OKD Stats
Name: crc-w6m86-master-0
Roles: master,worker
Labels: beta.kubernetes.io/arch=amd64
beta.kubernetes.io/os=linux
kubernetes.io/arch=amd64
kubernetes.io/hostname=crc-w6m86-master-0
kubernetes.io/os=linux
node-role.kubernetes.io/master=
node-role.kubernetes.io/worker=
node.openshift.io/os_id=fedora
@anjannath
anjannath / crc_client.js
Created July 10, 2020 06:42
Javascript to talk to crc daemon
const net = require('net');
const homedir = require('os').homedir();
const path = require('path');
const SOCKET_PATH = path.join(homedir, ".crc", "crc.sock");
function sendCommand(command, args) {
if (command === "") {
console.log("Command is required!!")
return
@anjannath
anjannath / daemonCleanup.ps1
Created July 9, 2020 06:14
PS Scripts for setup and cleanup of crc system tray on windows
$tempDir = $args[0]
$startUpFolder = "$Env:USERPROFILE\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
function RemoveUserFromServiceLogon
{
# security template to modify SeServiceLogonRight
$securityTemplate = @"
[Unicode]
Unicode=yes
[Version]

Windows

Todo:

  1. Design config UI
  2. Use daemon config api to modify crc configuration
  3. Create a progress window and animate icon
  4. Prompt user for pull secret bundle if not configured

In progress:

  1. Reduce the number of UAC prompts during setup