Skip to content

Instantly share code, notes, and snippets.

View magohl's full-sized avatar

Magnus Ohlsson magohl

View GitHub Profile
Forgot the WP password and no smtp setup?
docker exec into the mysql container
USE wordpress
UPDATE wp_users SET user_pass = MD5("my-new-password") WHERE wp_users.user_login = "my-admin-user";
using System;
public class LifeAsWeKnowIt : IDisposable
{
void Life()
{
bool isAlive = true;
do
{
try
Lets Encrypt + Nginx + aspnet core => docker
https://glenmccallum.com/
https://pipedream.com
@magohl
magohl / docker-snippets.txt
Last active June 11, 2019 06:56
Some useful docker snippets i use...
docker run -e TZ=Europe/Stockholm x:x
Good tips:
https://runnable.com/blog/9-common-dockerfile-mistakes
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Very#Secret#Password' -p 1433:1433 -d microsoft/mssql-server-linux:latest
MONGO:
docker run -p 27017:27017 -d -v $PWD/data/bin:/data/bin mongo
Expose local .net core appliation.
- comment out app.UseHttpsRedirection(); first
ssh -R 80:localhost:5000 serveo.net
To control the Xiaomi S50 2nd gen vaccum cleaner from Athom Homey (or some custom API) you need the IP and the TOKEN that the mobile app uses to connect.
Getting the Token involves (as of 2018-12-27):
- Downgrade mobile app to version 5.0.19 using apkmirror.com (The newer version does not save the token in its database)
-- Select you normal region and normal acocunt
- Set phone in developer and debug mode. Connect it using USB Cable.
- Use ADB Backup (using the Android SDK) or the MiToolkit 1.6 to backup the Mi Home application. On a modern phone you will probably have to select a password.
-- If using adb directly and not MiToolkit this is the command:
docker run -P -d jboss/wildfly /opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0
docker exec -it xxxx bash
/wildfly/bin/add-user
8080 = runtime
9990 = admin console
Updated gitignore AFTER and need to remove files
git rm -r --cached .
git add .
Ta bort large file efter att den är committad:
git filter-branch --tree-filter 'rm -rf path/to/your/file' HEAD
git push
@magohl
magohl / LinksAndTools.txt
Created December 28, 2016 08:01
Useful FHIR Links and tools
FHIR Resource Editor
Create (or edit) FHIR resources
http://docs.smarthealthit.org/fred/
Forge FHIR Profile Editor
Create Profiles etc.
http://fhir.furore.com/Forge
FHIR Repository for profiles, extensions etc.
https://www.simplifier.net