Skip to content

Instantly share code, notes, and snippets.

View magohl's full-sized avatar

Magnus Ohlsson magohl

View GitHub Profile
@magohl
magohl / gist:029efefbf15527b5f10d
Last active February 21, 2016 19:41
Raspberry Pi 2 - Install mono and ASP.NET 5
Raspian
-Resize sdcard
-Install mono
-Install DNVM
-Install DNVM Execution Env
-Download ASPNET samples
-Resore packages for HelloWorldMvc
-Run HelloWorldMvc
sudo raspi-config
@magohl
magohl / gist:2b36db9fb50e6fb846e4
Created March 30, 2015 21:24
Dev Host - Chocolatey script
choco install 7zip
choco install evernote
choco install fiddler
::ERROR choco install filezilla
choco install FoxitReader
choco install git.install
choco install greenshot
choco install nodejs.install
@magohl
magohl / gist:9fdc85d56541ff7f1fcb
Last active December 23, 2015 19:53
IISExpress SSL with ClientCertificates (2-way mututal SSL)
How to get VS2015 with IISExpress to work with a per "folder/controller" requirement of ClientCertificates:
1. Bind server certificate to port using (elevated) NETSH.EXE
--- netsh http add sslcert ipport=0.0.0.0:9880 certhash=ffffcf57c84e7ed391ee842d668f7f11fffffff appid={aaaabbbbccc-guid-ddddd}
--- Note that we will not enable client certificate negotiation here)
--- Tip: The server certificate is typically installed in LocalMachine/Personal as opposed to client certs that are in CurrentUser
2. Edit {your-app-folder}\src\.vs\config\applicationhost.config
---- Change overrideModeDefault to "allow" on access
---- <section name="access" overrideModeDefault="Allow" />
@magohl
magohl / 0_reuse_code.js
Created November 1, 2016 17:02
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@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
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
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
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:
Expose local .net core appliation.
- comment out app.UseHttpsRedirection(); first
ssh -R 80:localhost:5000 serveo.net
@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