- To be able to import gpg key from external drive, first copy ~/.gnupg file from external drive to the host machine (do with finder)
- via terminal, go into copied gnupg folder and try running
gpg --homedir . --list-secret-keys
- if you able to see "key found" information with your email address you are close to import your keys
- in case you see such warning "gpg: conversion
utf-8'
us-ascii' failed: illegal byte sequence gpg:" you can ignore it - due to change from gpg to gpg2, you may not be able to export your keys with "gpg" command so try doing the rest with "gpg2" command
- export your private key with
gpg2 --homedir . --export-secret-key YOUR_MAIL_ADDRESS > private.key
(it will ask your gpg password) - then go to your gpg suite, press import, find "private.key" file and import it (it will ask your gpg password)
- and you are done!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage | |
# **NOTE** Use at own risk! | |
# Improved version of this script: https://gist.github.com/pdobacz/90f8e204d4b2728c8b7e916f4bc279ae | |
# 1. checkout the desired branch in all relevant repos first! | |
# 2. `cd` into a dir where you can reference your repos by relative paths | |
# 3. ./main.sh <author> <Month Year> <Month Year> repo1 repo2 ... > |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
trap "exit" INT | |
# Meta information | |
SCRIPT_VERSION="0.1.0" | |
SCRIPT_AUTHOR="Karol Tomala" | |
# Default variables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dns from "dns"; | |
dns.resolveSrv("_girepo._tcp.dev.golem.network", (err, result) => { | |
console.log(result); | |
}) | |
/* result | |
[ | |
{ | |
name: 'yacn.dev.golem.network', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib.request | |
import re | |
EMOJI_TEST_FILENAME = "emoji-test.txt" | |
EMOJI_DATA_URL = "https://unicode.org/Public/emoji/14.0/emoji-test.txt" | |
def download_latest_emoji_test_data() : | |
response = urllib.request.urlopen(EMOJI_DATA_URL) | |
emoji_test_file = response.read() | |
with open(EMOJI_TEST_FILENAME, "wb") as tmp_file: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { override, addWebpackAlias } = require('customize-cra'); | |
const path = require('path'); | |
const overridePath = (webpackConfig) => { | |
const oneOfRule = webpackConfig.module.rules.find((rule) => rule.oneOf); | |
if (oneOfRule) { | |
const tsxRule = oneOfRule.oneOf.find( | |
(rule) => rule.test && rule.test.toString().includes('tsx') | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var INTERVAL = 1000; | |
var cycle_stop = false; | |
var daemon = false; | |
var timer; | |
process.argv.forEach(function (arg) { | |
if (arg === '-d') daemon = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ENS } from "@ensdomains/ensjs"; // 3.0.0-alpha.39 | |
import { providers } from "ethers"; // 5.7.2 | |
const client = new ENS(); | |
const provider = new providers.Web3Provider(window.ethereum, "goerli"); | |
async function setENSAvatar() { | |
await client.setProvider(provider); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dnsWireFormat(domain, ttl, type, cls, address) { | |
let labels = domain.split("."); | |
let output = ""; | |
for (let label of labels) { | |
output += label.length.toString(16).padStart(2, '0'); | |
for (let char of label) { | |
output += char.charCodeAt(0).toString(16); | |
} | |
} |
The Ethereum Name Service is a decentralised naming protocol for the new internet. If your project requires users to input ETH address or display ETH address, consider integrate with ENS so that you can show human readable names.
Any type of ENS integration is eligible for this prize (NOTE: We do not accept projects simply hardcoding ENS names).
Please follow the quick start guide to learn how to integrate ENS names programatically.
OlderNewer