Skip to content

Instantly share code, notes, and snippets.

View mig5's full-sized avatar

mig5

View GitHub Profile
# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand.
[[package]]
name = "ansible"
version = "7.6.0"
description = "Radically simple IT automation"
category = "main"
optional = false
python-versions = ">=3.9"
files = [
@mig5
mig5 / gist:3b352d2d09d61faddfb2b722e60478ee
Created December 8, 2022 23:39
mastodon hardened docker-compose.yml
version: '3'
services:
db:
restart: always
image: postgres:14-alpine
shm_size: 256mb
networks:
- internal_network
user: "70"
cap_drop:
@mig5
mig5 / ipfs-folder-and-files-publish-poc.py
Last active May 4, 2024 04:00
A PoC showing how to publish a folder containing files to IPFS via Python using requests module
#!/usr/bin/env python3
# This code is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. The author
# accepts no responsibility for its use, of which you do so at
# your own risk.
import json
import requests
#!/usr/bin/env python3
import nacl.public
import base64
from stem.control import Controller
def base_32(key):
# bytes to base 32
#!/usr/bin/env python3
import base64
import threading
from http.server import BaseHTTPRequestHandler, HTTPServer
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
from cryptography.hazmat.primitives import serialization
from stem.control import Controller
diff --git a/onionshare/onion.py b/onionshare/onion.py
index 7122c20..6066f05 100644
--- a/onionshare/onion.py
+++ b/onionshare/onion.py
@@ -494,7 +494,7 @@ class Onion(object):
# A new private key was generated and is in the Control port response.
if self.settings.get('save_private_key'):
if not self.settings.get('private_key'):
- self.settings.set('private_key', key_content)
+ self.settings.set('private_key', res.private_key)
diff --git a/onionshare/__init__.py b/onionshare/__init__.py
index 2f0ef14..069559c 100644
--- a/onionshare/__init__.py
+++ b/onionshare/__init__.py
@@ -33,8 +33,12 @@ def main(cwd=None):
"""
common = Common()
- # Load settings right away, in order to get locale setting for strings
- common.load_settings(config)
Building in workspace /home/jenkins/jobs/onionshare_nightly_gui_test/workspace
Wiping out workspace first.
Cloning the remote Git repository
Cloning repository https://github.com/micahflee/onionshare
> git init /home/jenkins/jobs/onionshare_nightly_gui_test/workspace # timeout=10
Fetching upstream changes from https://github.com/micahflee/onionshare
> git --version # timeout=10
> git fetch --tags --progress https://github.com/micahflee/onionshare +refs/heads/*:refs/remotes/origin/*
> git config remote.origin.url https://github.com/micahflee/onionshare # timeout=10
> git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
@mig5
mig5 / mig5-onion.asc
Created January 23, 2018 03:37
mig5 onion
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
v2 Onion: http://qz226vsfiwwwoiej.onion/
v3 Onion: http://cjspb7p4vvpsnijbqnv7su5a7lghdcvhr3hqav6bvl4rlhxz3efx52yd.onion/
non-Onion: https://mig5.net/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
@mig5
mig5 / oniontest.py
Last active May 23, 2017 11:52
oniontest.py
#!/usr/bin/env python3
import os, sys, unittest, inspect, time
from PyQt5 import QtCore, QtWidgets, QtGui, QtTest
from onionshare import onion, strings, common
from onionshare_gui import *
app = QtWidgets.QApplication(sys.argv)
class OnionShareGuiTest(unittest.TestCase):