Skip to content

Instantly share code, notes, and snippets.

View jkiddo's full-sized avatar
🔥
🥷

Jens Kristian Villadsen jkiddo

🔥
🥷
View GitHub Profile
@0xjac
0xjac / private_fork.md
Last active April 18, 2024 07:04
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@staltz
staltz / introrx.md
Last active April 18, 2024 05:34
The introduction to Reactive Programming you've been missing
@wojteklu
wojteklu / clean_code.md
Last active April 18, 2024 04:56
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

@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active April 18, 2024 00:26
Using multiple github accounts with ssh keys

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.
@simoncos
simoncos / golang_on_rpi.md
Last active March 30, 2024 17:56 — forked from konradko/golang_on_rpi.md
Install Golang 1.9 on Raspberry Pi

Install Golang 1.9:

wget https://storage.googleapis.com/golang/go1.9.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.9.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin # put into ~/.profile

If already installed old golang with apt-get:

@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@jonico
jonico / Jenkinsfile
Last active January 31, 2024 09:43
Example for a full blown Jenkins pipeline script with CodeQL analysis steps, multiple stages, Kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, …
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8

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.
@petersellars
petersellars / activate_chuck_norris.groovy
Created March 4, 2015 22:26
Jenkins Groovy Scripts: Activate Chuck Norris Plugin for all Jobs
import jenkins.model.*
for(item in Jenkins.instance.items) {
println("job $item.name")
if (!(item.class == org.jenkinsci.plugins.workflow.job.WorkflowJob)) {
chuck_activated = false
for (publisher in item.publishersList) {
if (publisher.descriptor.displayName == "Activate Chuck Norris")
chuck_activated = true
}
@simonhaenisch
simonhaenisch / rpi-osmc-and-shairport.md
Last active February 15, 2018 00:50
RPi: OSMC & shairport-sync #raspberrypi

Raspberry Pi with OSMC and shairport-sync

It is assumed that OSMC is installed and running on the Raspberry, and the Airport service should be disabled (though it doesn't have to be, but who needs two Airplay services). OSMC is based on Debian 8 (Jessie).


If you get Error opening terminal when opening nano or alsamixer, update the current TERM:

export TERM=xterm