Skip to content

Instantly share code, notes, and snippets.

View woss's full-sized avatar
🛸

Daniel Maricic woss

🛸
View GitHub Profile
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
@woss
woss / Exif-questdb-schema.sql
Created January 11, 2024 14:40 — forked from javier/Exif-questdb-schema.sql
Exif-questdb-schema
CREATE TABLE CameraDetails (
Manufacturer SYMBOL,
Model SYMBOL,
Orientation SYMBOL,
Software STRING,
DateAndTime timestamp,
YCbCrPositioning SYMBOL,
Compression SYMBOL,
XResolution LONG,
YResolution LONG,
Last login: Thu Sep 7 14:24:51 on ttys011
+(eval):1> z4h load ohmyzsh/ohmyzsh/plugins/nvm
+z4h:1> (( 1 ))
+z4h:2> -z4h-cmd-load ohmyzsh/ohmyzsh/plugins/nvm
+-z4h-cmd-load:1> local -a compile
+-z4h-cmd-load:2> zparseopts -D -F -- 'c=compile' '-compile=compile'
+-z4h-cmd-load:4> local -a files
+-z4h-cmd-load:6> '(anon)' ohmyzsh/ohmyzsh/plugins/nvm
+(anon):1> emulate -L zsh -o extended_glob
+(anon):2> local pkgs=( /Users/woss/.cache/zsh4humans/v5/ohmyzsh/ohmyzsh/plugins/nvm )
@woss
woss / rush.yaml
Last active August 21, 2023 13:06
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
name: 'ubuntu-latest / Node.js ${{ matrix.node-version }}'
steps:
- uses: actions/checkout@v3
with:
lfs: true
import axios from "axios";
import FormData from "form-data";
// create DL stream
const dl = await axios.get('url.tar', {
responseType: "stream",
});
// create multipart
const formData = new FormData();
# General purpose ipfs gateway for Macula nodes;
*.g.macula.link {
	encode gzip
	# rewrite the main request
	rewrite * /ipfs/{labels.3}{uri}

	reverse_proxy {
 # proxy all to the IPFS gateway
{
"version": 1,
"strategy": "github",
"context": {
"UrlForDomainWithUsername": [
"https://github.com/woss",
"github.com",
"woss"
]
},
### Keybase proof
I hereby claim:
* I am woss on github.
* I am woss (https://keybase.io/woss) on keybase.
* I have a public key ASCIOvreMXBvtKpXx4febUjidog6icRKTyBgQJTTGRQ8IQo
To claim this, I am signing this object:
@woss
woss / create-parachain-spec.sh
Last active March 3, 2023 18:07
Use docker to generate spec for the parachain and create the needed files. This script expects OCI has the CMD responding with the binary. You can also use it to generate relaychain specs
#!/usr/bin/env bash
#########################################################################################################################
## Make it excutable
## chmod +x create.sh
##
## Parachain example
## ./create.sh --chain local --image registry.gitlab.com/anagolay/anagolay/idiyanale:3861d9b3 --parachain 4222
##
## Relaychain example
## ./create.sh --chain rococo-local --image parity/polkadot:v0.9.38 --relay
@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 )