Skip to content

Instantly share code, notes, and snippets.

View 4rmx's full-sized avatar

4rmx 4rmx

View GitHub Profile
@4rmx
4rmx / AndroidManifest.xml
Created March 6, 2021 06:59
AndroidManifest of rn-http-fetch
<application
...
android:usesCleartextTraffic="true"
android:networkSecurityConfig="@xml/network_security_config"
>
@4rmx
4rmx / network_security_config.xml
Created March 6, 2021 07:03
network_security_config of rn-http-fetch
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="false">localhost</domain>
<domain includeSubdomains="false">192.168.0.119</domain>
<domain includeSubdomains="false">192.168.0.106</domain>
<base-config cleartextTrafficPermitted="true"/>
</domain-config>
</network-security-config>
@4rmx
4rmx / mongod_dbpath
Created March 26, 2021 04:53
Run Mongodb with db option
mongod --dbpath /some/path
@4rmx
4rmx / mockupRecipe.json
Last active June 1, 2021 16:22
mockup data
[
{
"title": "ผัดไทย",
"subtitle": "เมนูแบบไทยดังไกลทั่วโลก",
"image_id": "518035",
"create_at": "1622512759",
"ingredients": [
{
"name": "เส้นจันท์",
"amount": "250",
@4rmx
4rmx / atSameName.js
Last active August 1, 2021 11:27
gist at same name
console.log('gist name')
console.log('rv1')
console.log('rv2')
@4rmx
4rmx / streamToBuffer.js
Created March 14, 2023 04:57
convert stream to buffer in nodejs
/**
* @param {import('stream').Stream} stream
*/
async function streamToBuffer(stream) {
const chunks = [];
return new Promise((resolve, reject) => {
stream.on('data', (chunk) => chunks.push(Buffer.from(chunk)));
stream.on('error', (err) => reject(err));
stream.on('end', () => resolve(Buffer.concat(chunks)));
});
# The 24th Word - a tool for a fully offline wallet generation (run on an airgapped machine)
import os
import sys
import hashlib
import binascii
class Bip39Check(object):
def __init__(self, language):
self.radix = 2048
@4rmx
4rmx / comfyUI_workflow_inpaintShirt.json
Created September 2, 2023 15:09
comfyUI_workflow - shirt inpainting
{
"last_node_id": 190,
"last_link_id": 390,
"nodes": [
{
"id": 6,
"type": "CLIPSetLastLayer",
"pos": [
360,
50
@4rmx
4rmx / inpaint_only_masked.json
Created September 6, 2023 14:16
workflow for ComfyUI Inpainting (only masked)
{
"last_node_id": 446,
"last_link_id": 711,
"nodes": [
{
"id": 416,
"type": "CLIPTextEncode",
"pos": [
0,
30
{
"last_node_id": 40,
"last_link_id": 61,
"nodes": [
{
"id": 26,
"type": "Reroute",
"pos": [
-520,
-60