Skip to content

Instantly share code, notes, and snippets.

View tomlankhorst's full-sized avatar
🌊

Tom Lankhorst tomlankhorst

🌊
View GitHub Profile
@tomlankhorst
tomlankhorst / invensense-license.txt
Last active June 15, 2016 16:23
INVENSENSE EMBEDDED MOTIONAPPS™ SOFTWARE LICENSE AGREEMENT
INVENSENSE EMBEDDED MOTIONAPPS™ SOFTWARE LICENSE AGREEMENT
IMPORTANT: PLEASE READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY BEFORE DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING THE SOFTWARE PROVIDED UNDER THIS AGREEMENT. This Software License Agreement (“Agreement”) is a binding legal agreement between InvenSense, Inc. located at 1197 Borregas Ave, Sunnyvale, CA 94089 ( “InvenSense”) and you (both the individual installing the Software and any single legal entity on behalf of which such individual is acting) (“Licensee”). By selecting “I ACCEPT” below, or by downloading, installing, copying or otherwise using the Software, Licensee acknowledges that it, he or she has read all of the terms and conditions of this Agreement, understands them, and agrees to be bound by them. IF YOU DO NOT AGREE TO ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT, YOU MUST NOT DOWNLOAD, INSTALL, COPY, OR OTHERWISE USE THE SOFTWARE.
1. PURPOSE
This Agreement provides the terms and conditions for Licensee’s licen
@tomlankhorst
tomlankhorst / # haptix-comm - 2018-02-14_10-02-16.txt
Created February 14, 2018 09:03
haptix-comm (osrf/simulation/haptix-comm) on macOS 10.13.3 - Homebrew build logs
Homebrew build logs for osrf/simulation/haptix-comm on macOS 10.13.3
Build date: 2018-02-14 10:02:16
@tomlankhorst
tomlankhorst / nginx.conf
Last active May 29, 2022 02:47
Containerised NGINX config for HTTPS with HTTP/2 with Let's Encrypt certificates. https://tomlankhorst.nl/secure-nginx-docker-container-with-lets-encrypt/
# Used on nginx/1.15.5
# https://tomlankhorst.nl/secure-nginx-docker-container-with-lets-encrypt/
#
# see: https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=nginx-1.15.5a&openssl=1.0.1e&hsts=yes&profile=modern
# Oldest compatible clients: Firefox 27, Chrome 30, IE 11 on Windows 7, Edge, Opera 17, Safari 9, Android 5.0, and Java 8
server {
listen 80 default_server;
root /application/public/;
@tomlankhorst
tomlankhorst / MigrationsCompiler.php
Created April 12, 2019 09:38
Laravel Migrations Compiler
<?php
namespace Tests;
/**
* This class fakes all migrations and builds a single SQL file that is stored in the /tests folder.
* Then, the corresponding SQL can be used to build a fresh new table.
*
* Simply run in your TestCase setup:
* ```
@tomlankhorst
tomlankhorst / benchmark.cpp
Created November 28, 2019 22:57
Eigen benchmark for 3D vector multiplication
#include <eigen3/Eigen/StdVector>
#include <iostream>
#include <random>
#include <vector>
#include <benchmark/benchmark.h>
template<typename Vector_>
using AlignedVector = std::vector<Vector_, Eigen::aligned_allocator<Vector_>>;
@tomlankhorst
tomlankhorst / docker-swarm-gpu.md
Last active April 26, 2024 23:03
Instructions for Docker swarm with GPUs
@tomlankhorst
tomlankhorst / authorized_keys.sh
Created March 21, 2020 16:33
AuthorizedKeysCommand that appends a public list of keys to the user's list.
#!/bin/bash
# USE AT OWN RISK
# Current user
USER=$1
HOME=$(eval echo ~$USER)
# Base keys
cat $HOME/.ssh/authorized_keys
// https://javadoc.jenkins.io/jenkins/model/Jenkins.html#getItemByFullName-java.lang.String-
def organization = Hudson.instance.getItemByFullName('my_organization')
if (!organization) throw new Exception("No organization by that name")
// https://javadoc.jenkins.io/plugin/cloudbees-folder/com/cloudbees/hudson/plugins/folder/AbstractFolder.html#getItems--
def jobs = organization.getItems()
jobs.each {
// find the sub-job that's named "master"
// https://javadoc.jenkins.io/hudson/model/Item.html#getName--
master = it.items.find { it.getName() == "master" }
<VirtualHost *:443>
ServerName service.com
# Set CORS headers to allow XHR
# Determine if Origin matches the regex
SetEnvIf Origin "http(s)?://(www.api-client.com|beta.api-client.com:8000)$" AccessControlAllowOrigin=$0
# Set Access-Control-Allow-Origin if the Origin is allowd
Header always set Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
Header always set Access-Control-Allow-Credentials true
Header always set Access-Control-Allow-Headers "Origin, Authorization, Accept"
@tomlankhorst
tomlankhorst / thanks
Last active April 29, 2020 07:31
⭐ Thanks! Star the current GitHub repository.
#!/usr/bin/env python3
import os
import re
import requests
from subprocess import check_output
github_origin_re = r"^(git@github\.com:|https:\/\/github.com\/)([\w\-_]+)\/([\w\-_]+)\.git$"
try: