Skip to content

Instantly share code, notes, and snippets.

View jkiddo's full-sized avatar
🔥
🥷

Jens Kristian Villadsen jkiddo

🔥
🥷
View GitHub Profile

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@jkiddo
jkiddo / Setup.md
Created December 27, 2020 21:44
Setup Snapcast client on Raspbian Jessie lite

Setup Snapcast client on Raspbian Jessie / Stretch lite

Prerequisite

  • A Snapcast server
  • A Raspberry Pi running Raspbian Jessie/Stetch lite with SSH enabled

Setup Raspbian

  1. Login to Pi using SSH
@jkiddo
jkiddo / clean_code.md
Created September 3, 2019 18:18 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@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

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.
@jkiddo
jkiddo / introrx.md
Created June 29, 2017 07:16 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing