Skip to content

Instantly share code, notes, and snippets.

View woss's full-sized avatar
🛸

Daniel Maricic woss

🛸
View GitHub Profile
@woss
woss / .env
Last active March 1, 2023 19:15
Remote signer setup
COMPOSE_PROJECT_NAME=remote-signer
ENABLE_API_KEY_SUPPORT=true
APPROVED_API_KEY=( UUID4 or anything really as long as this is exported on the sender side )
// enable this in docusaurus.config.js > plugins: [require('./plugins/gitpod')],
/**
* Docusaurus plugin to work with the gitpod and HMR
*/
module.exports = function () {
const { GITPOD_WORKSPACE_URL } = process.env;
return {
name: 'enable-hot-reload-for-gitpod',
configureWebpack(config, isServer) {
import axios from 'axios';
import { fromBuffer } from 'file-type';
import { equals, includes, isEmpty, isNil, last, split } from 'ramda';
/**
* Checks is the payload image and if it is will also check do we need to process it, the searchParams are not empty. Internally this method will fetch the minimum amount of bytes (4100) using the Range header and try to determine the mime type.
*
* Example:
*
* ```ts
* // this will return false because it doesn't have the searchParams
image: woss/gitpod-workspace:gitpod_workspace-full_2022-05-08-14-31-53
tasks:
- name: prep env
before: >
pnpm add -g json @microsoft/rush@5.71.0
init: >
node common/scripts/install-run-rush.js update && exit
- name: Start mongodb container
command: cp dev-env .env && docker-compose up -d ipfs db && exit
tasks:
- name: prep env
init: >
bash devops/install-deps.sh && cp env.sample .env && node common/scripts/install-run-rush.js update && exit
- name: Start mongodb container
command: docker-compose up -d ipfs db && exit
import { filter, isEmpty, split, startsWith } from 'ramda';
/**
* Parse the hash string and return the the value for the given name
* @param fullHash - The value of `$page.url.hash`
* @param hashName - Name of the hash which comes in `nam=value` format
* @returns decoded value via `decodeURIComponent`
*/
export function getHashValue(fullHash: string, hashName: string): string {
console.log('getHashValue', { hashName, fullHash });
@woss
woss / Dockerfile
Created March 22, 2022 12:05 — forked from pepyakin/Dockerfile
Substrate Raspberry PI cross-compile build
# Put this file in the root of substrate / polkadot directory and build the image using
# the following command:
#
# docker build -t <container id> .
#
# you can pick <container id> yourself. For example: `johndoe/rpi-cross`.
#
FROM rust:latest
BEGIN MESSAGE.
1eYirDxpAOKX9ds rl1OnjeYazalApH m0G4i0bHAFvQdv2 2QOmzieTMHLkjqi
flBA5wtRVZ7mEcN WsvIV6NVaOmTCKq 6Xr2MZHgg6tQkgj DHBfNlZB9TyhXbx
3WfxsKToqSnEmsY 2p2D8LsfT1eBp6H FXlJ1SEExKWkDyt I1zoESG34Ip2r4I
JcojqYXgYcB5dLR WqTZuNyqYbCUZOw 82YP.
END MESSAGE.
type OperationID = string
type OperationChild = [OperationID, [] | OperationChild[]]
interface Operation {
name: string,
ops: OperationChild[]
}
export async function lib() {
@woss
woss / vim.init.toml
Last active October 11, 2022 03:23
#=============================================================================
# dark_powered.toml --- dark powered configuration example for SpaceVim
# Copyright (c) 2016-2020 Wang Shidong & Contributors
# Author: Wang Shidong < wsdjeg at 163.com >
# URL: https://spacevim.org
# License: GPLv3
#=============================================================================
# All SpaceVim option below [option] section
[options]