Skip to content

Instantly share code, notes, and snippets.

Jens Kristian Villadsen jkiddo

Block or report user

Report or block jkiddo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@simoncos
simoncos / golang_on_rpi.md
Last active Oct 4, 2019 — forked from konradko/golang_on_rpi.md
Install Golang 1.9 on Raspberry Pi
View golang_on_rpi.md

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:

@jonico
jonico / Jenkinsfile
Last active Oct 13, 2019
Example for a full blown Jenkins pipeline script with 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, stage timeouts, stage c…
View Jenkinsfile
#!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-alpine
@wojteklu
wojteklu / clean_code.md
Last active Oct 13, 2019
Summary of 'Clean code' by Robert C. Martin
View clean_code.md

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

@simonhaenisch
simonhaenisch / rpi-osmc-and-shairport.md
Last active Feb 15, 2018
RPi: OSMC & shairport-sync #raspberrypi
View rpi-osmc-and-shairport.md

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
@bastman
bastman / docker-cleanup-resources.md
Created Mar 31, 2016
docker cleanup guide: containers, images, volumes, networks
View docker-cleanup-resources.md

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
@petersellars
petersellars / activate_chuck_norris.groovy
Created Mar 4, 2015
Jenkins Groovy Scripts: Activate Chuck Norris Plugin for all Jobs
View activate_chuck_norris.groovy
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
}
View hacking-the-whitebox.md

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.
@staltz
staltz / introrx.md
Last active Oct 14, 2019
The introduction to Reactive Programming you've been missing
View introrx.md
@kidfolk
kidfolk / README.md
Created Dec 5, 2012 — forked from JakeWharton/README.md
Maven pom for Google Play services
View README.md

Maven + Google Play Services

The recently released version of Google Play Services presents itself as a library project with string and attribute resources coupled with a .jar in the libs/ folder that has been compiled against internal APIs.

While this is convenient for users of IDEs or Ant, it presents a problem for those using proper build systems (e.g., Maven, Gradle) with dependency management. Inside the .jar there are a lot of classes which reference static attributes on the com.google.android.gsm.R class. This means that

You can’t perform that action at this time.