Skip to content

Instantly share code, notes, and snippets.

@shoeper
shoeper / fix-windows-search-permissions.md
Last active November 26, 2020 22:06
Fix Windows Search permissions

Run cmd.exe as Administrator and execute the following command:

When your search doesn't work and Windows troubleshooting says the permissions are wrong, but cannot fix it, run the following command to fix the permissions and your search probably works, again (immediately).

takeown.exe /R /F C:\ProgramData\Microsoft\Search\

if it still doesn't work run

takeown.exe /R /F C:\ProgramData\Microsoft\
@shoeper
shoeper / diceware6-openthesaurus.sh
Created November 23, 2020 19:27 — forked from buchnema/diceware6-openthesaurus.sh
Creating German diceware wordlist from Open Thesaurus for six-sided dice
#!/bin/bash
: <<'COMMENT'
This script takes the dataset from the Open Thesaurus project and
transforms it to a wordlist comparable to the original diceware list.
I thought the original list contains too much lines which just don't
make any sense and/or are hard to memorize. So my goal was to
automatically generate a list containing only memorable words, which
can then be used to add your own special characters or variations.
@shoeper
shoeper / diceware10-openthesaurus.sh
Created November 23, 2020 19:24 — forked from buchnema/diceware10-openthesaurus.sh
Creating German diceware wordlist from Open Thesaurus for ten-sided dice
#!/bin/bash
: <<'COMMENT'
This script takes the dataset from the Open Thesaurus project and
transforms it to a wordlist comparable to the original diceware list.
I thought the original list contains too much lines which just don't
make any sense and/or are hard to memorize. So my goal was to
automatically generate a list containing only memorable words, which
can then be used to add your own special characters or variations.
@shoeper
shoeper / vpn.md
Created December 4, 2019 15:55 — forked from joepie91/vpn.md
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

A Russian translation of this article can be found here, contributed by Timur Demin. There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.

Why not?

@shoeper
shoeper / vulnerabilities.txt
Created August 5, 2019 13:11
Vulnerabilities in docker.seadrive.org/seafileltd/seafile-pro:latest scanned with Clair Scanner
2019/08/05 10:43:15 [WARN] ▶ Image [docker.seadrive.org/seafileltd/seafile-pro:latest] contains 325 total vulnerabilities
2019/08/05 10:43:15 [ERRO] ▶ Image [docker.seadrive.org/seafileltd/seafile-pro:latest] contains 325 unapproved vulnerabilities
+------------+-----------------------------+---------------------+-------------------------------+------------------------------------------------------------------+
| STATUS | CVE SEVERITY | PACKAGE NAME | PACKAGE VERSION | CVE DESCRIPTION |
+------------+-----------------------------+---------------------+-------------------------------+------------------------------------------------------------------+
| Unapproved | High CVE-2018-16865 | systemd | 237-3ubuntu10.3 | An allocation of memory without limits, that could result |
| | | | | in the stack
@shoeper
shoeper / glassfish4-localhost-domain.xml
Created September 19, 2018 16:12 — forked from nikku/glassfish4-localhost-domain.xml
A stripped down domain.xml for Glassfish 4 application servers behind an Apache 2 / Nginx proxy.
<domain log-root="${com.sun.aas.instanceRoot}/logs" application-root="${com.sun.aas.instanceRoot}/applications" version="89">
<security-configurations>
<authentication-service default="true" name="adminAuth" use-password-credential="true">
<security-provider name="spcrealm" type="LoginModule" provider-name="adminSpc">
<login-module-config name="adminSpecialLM" control-flag="sufficient" module-class="com.sun.enterprise.admin.util.AdminLoginModule">
<property name="config" value="server-config"></property>
<property name="auth-realm" value="admin-realm"></property>
</login-module-config>
</security-provider>
<security-provider name="filerealm" type="LoginModule" provider-name="adminFile">
@shoeper
shoeper / nginx-unificontroller.conf
Created August 24, 2018 17:20 — forked from vidia/nginx-unificontroller.conf
Example, working, NGINX config for proxying to Unifi Controller software and using letsencrypt. Includes websocket fix.
# I had a bit of trouble getting my unifi controller (hosted offsite) to use a proxy/letsencrypt. So here are the fruits of my labor.
# The unifi default port is 8443 running on localhost.
# License: CC0 (Public Domain)
server {
# SSL configuration
#
listen 443 ssl default_server;
listen [::]:443 ssl default_server;

Enable Docker Remote API with TLS client verification

Docker's Remote API can be secured via TLS and client certificate verification.
First of all you need a few certificates and keys:

  • CA certificate
  • Server certificate
  • Server key
  • Client certificate
  • Client key

Create certificate files

@shoeper
shoeper / tuya_cloud.py
Created June 14, 2018 14:38 — forked from bahorn/tuya_cloud.py
Cloud endpoint
import requests
import hashlib
import time
import uuid
import os
import copy
import json
# Fixed up version of my previous code to work with the Cloud endpoints.
# Hopefully this works.
@shoeper
shoeper / sign.py
Created June 13, 2018 13:54 — forked from bahorn/sign.py
Implementation of the Tuya API signing.
import requests
import hashlib
import time
import uuid
import os
import copy
import json
# This is based on my personal implementation but stripped down to only what is
# needed to verify it.