Skip to content

Instantly share code, notes, and snippets.

I use the QNAP nas server to host docker containers. We can configure
this mac to run docker-machine and point to the qnap server to deploy or
otherwise mess with docker.
This is how we set that up:
docker-machine create --driver=none --url tcp://<your qnap box>:2376 qnap
Next we need to install the certs. Download them from within the QNAP
@kendrikat
kendrikat / advent_judge.rb
Last active December 16, 2017 16:24
advent_judge.rb
def adv(ga = 65, gb = 8921, n = 40000000)
judge = 0
n.times do
ga = ga * 16807 % 2147483647
gb = gb * 48271 % 2147483647
judge += 1 if (ga & 65535) == (gb & 65535)
end
judge
end
puts adv
@kendrikat
kendrikat / carrierwave.rb
Created March 23, 2017 11:43 — forked from artemave/carrierwave.rb
minimagick carrierwave round image (with white border)
# config/initializers/carrierwave.rb
require 'mini_magick'
module CarrierWave
module MiniMagick
# round _square_ image
def round
manipulate! do |img|
img.format 'png'
@kendrikat
kendrikat / sc-gamepad-6dof-map.xml
Created June 12, 2016 10:23
[The only other guy using a gamepad for SC] star-citizen-gamepad-6dof-map.xml
<?xml version="1.0" encoding="UTF-8"?>
<ActionMaps version="1" optionsVersion="2" rebindVersion="2" profileName="Gamepad Dual-Stick 6DOF Layout">
<CustomisationUIHeader label="Gamepad Dual-Stick 6DOF Layout" description="" image="">
<devices>
<keyboard instance="1" />
<mouse instance="1" />
<xboxpad instance="1" />
</devices>
<categories>
<category label="@ui_CCSpaceFlight" />
@kendrikat
kendrikat / install-comodo-ssl-cert-for-nginx.rst
Last active March 24, 2020 17:00 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

Keybase proof

I hereby claim:

  • I am kendrikat on github.
  • I am kendrikat (https://keybase.io/kendrikat) on keybase.
  • I have a public key whose fingerprint is 1E0C 5544 93FD DDB6 F025 D5E1 97CB BD85 EE84 CE0F

To claim this, I am signing this object: