Skip to content

Instantly share code, notes, and snippets.

View jkiddo's full-sized avatar
🔥
🥷

Jens Kristian Villadsen jkiddo

🔥
🥷
View GitHub Profile
@jkiddo
jkiddo / wifi
Last active April 19, 2018 15:46
#!/bin/bash
# Sagemcom Fast 3890 script for enabling/disabling Wifi
user="admin"
password="somePassword"
ssid="MySSID"
POSITIONAL=()
while [[ $# -gt 0 ]]
do

CentOS 7 fix for letting containers reach other containers on the same host:

From moby/moby#16137 (comment)

nmcli connection modify docker0 connection.zone trusted
systemctl stop NetworkManager.service
firewall-cmd --permanent --zone=trusted --change-interface=docker0
systemctl start NetworkManager.service
nmcli connection modify docker0 connection.zone trusted
docker run -it --rm --name python-web -p 8000:8000 -v "$PWD":/usr/src/myapp -w /usr/src/myapp python:3 python -m http.server
@jkiddo
jkiddo / get_oracle_jdk_linux_x64.sh
Last active March 15, 2018 09:01 — forked from n0ts/get_oracle_jdk_x64.sh
Get latest Oracle JDK package bash shell script
#!/bin/bash
# From: https://gist.github.com/n0ts/40dd9bd45578556f93e7 with suggested corrections
# You must accept the Oracle Binary Code License
# http://www.oracle.com/technetwork/java/javase/terms/license/index.html
# usage: get_jdk.sh <jdk_version> <ext>
# jdk_version: 8(default) or 9
# ext: rpm or tar.gz
@jkiddo
jkiddo / MM
Created January 18, 2018 15:19
Are you somewhat tech-related?
Have you ever heard of versioning systems?
Do you happen to find documents attached to mails in your inbox?
@jkiddo
jkiddo / FHIR.Subscription.md
Last active November 15, 2017 13:37
FHIR Subscription resource 'stuff-worth-talking-about'
  • Returing all resources matching criteria upon creation of a subscription
    • Current situation is that the client is supposed to know the full state up front. If any change occurs between the client trying to figure out what the full state is and creating the subscription, that state change is lost. This is fixed by letting the server evaluate the criteria once the subscription is created - and then acting upon it.
  • Resources leaving the criteria
    • When resources leaves the criteria the client is not notified. This makes it pretty hard to base an implementation around a more event based approach where the server is supposed to notify the client about any changes that may occur. As long as resources leaving the criteria set is not part of the notifications clients will become stale pretty quickly.
  • Order and use of ETag for updates
  • The order of the updates is not described. If ETags are used by the notifying server, the client is able to detect if an update has gone missing one way or another. The u
[
{
"code":"K84",
"text":"Hjertesygdom IKA",
"idc10":[
"di310",
"di311",
"di312",
"di313",
"di318",
@jkiddo
jkiddo / ICPC-2DK
Last active August 14, 2017 11:47
ICPC-2DK
dake2.dudal.com/icpc/
eg. http://dake2.dudal.com/icpc/icpcserver.php?action=convert&icpc=z02&icd10
A30 Komplet helbredsvurdering (A97)
A31 Delvis helbredsundersøgelse (A97)
A62 Administrativ procedure (A97)
A43 Anden diagnostisk procedure (A98)
A44 Vaccination (A98)
A45 Sundhedsoplysning (A98)

Hacking the SamKnows Whitebox

The SamKnows Whitebox is a free router (TP-Link TL-WDR3600) provided by SamKnows to gather internet speed statistics. Ok that's great, but any person with a small amount of hacker's spirit will want to hack it to install some custom firmware to take advantage of the two gigantic antennas on the back, the USB ports and everything else.

Step 1 : Debug mode

Root access can be obtained via a "debug mode" on the router giving you a direct root shell via telnet, amazingly simple.

  • Disconnect the Whitebox from the internet.
  • Connect your computer directly to the Whitebox via Ethernet to one of the four ethernet ports on the Whitebox.
  • Configure your computer's IP settings to "Manual" setting the computer's IP address to 192.168.1.2, the Subnet Mask to 255.255.255.0 and the Gateway to 192.168.1.1.
  • Turn off the Whitebox.
#!/bin/bash
#
# Execute some fairly simple CEC commands
# Can use the "server" if its already running for faster execution
# or will fall back to starting the cec-client in "single pass" mode.
#
# Another terrible hack from Will Cooke. http://www.whizzy.org
#
# Handy site: http://www.cec-o-matic.com/
#