Skip to content

Instantly share code, notes, and snippets.

View trkoch's full-sized avatar

Tristan Koch trkoch

View GitHub Profile
@trkoch
trkoch / diff.js
Last active January 30, 2021 19:26
fast-diff sqlite3.c amalgamation
#!/usr/bin/env node
const fs = require('fs/promises')
const diff = require('fast-diff')
async function main() {
const startAll = process.hrtime.bigint()
const startRead = process.hrtime.bigint()
// Download from https://www.sqlite.org/2021/sqlite-autoconf-3340100.tar.gz
@trkoch
trkoch / germany.yml
Created April 10, 2020 19:59
de.coronastatus.eu
apiVersion: apps/v1
kind: Deployment
metadata:
name: germany
spec:
selector:
matchLabels:
app: germany
replicas: 2
template:
@trkoch
trkoch / index.html
Created August 22, 2017 10:02
CSS Grid Layout // source https://jsbin.com/naxiray
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>CSS Grid Layout</title>
<style id="jsbin-css">
.grid-layout {
display: grid;
grid-template-columns: repeat(12, 1fr);
@trkoch
trkoch / Default.html
Created May 28, 2015 12:16
Neos: Google Analytics and (environment specific) tracking id
<f:section name="bodyScripts">
<!-- ... -->
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
@trkoch
trkoch / jshint.sh
Last active August 29, 2015 14:18
Recursively run JSHint
find path/to/scripts/ -iname "*.js" | xargs -n1 jshint
@trkoch
trkoch / gist:92561a886da5c4c2b69b
Created December 13, 2014 19:50
bundle exec rake vmware_fusion:ubuntu-14.04-amd64:all
$ bundle exec rake vmware_fusion:ubuntu-14.04-amd64:all
mkdir -p iso
cd iso && curl -L -O -# --fail -S https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/6.0.3/1747349/packages/com.vmware.fusion.tools.linux.zip.tar
######################################################################## 100,0%
cd iso && tar xf com.vmware.fusion.tools.linux.zip.tar && unzip -o com.vmware.fusion.tools.linux.zip
Archive: com.vmware.fusion.tools.linux.zip
inflating: manifest.plist
creating: payload/
inflating: payload/linux.iso
extracting: payload/linux.iso.sig
@trkoch
trkoch / Gruntfile.js
Created July 28, 2014 11:14
Simple Gruntfile using grunt-contrib-connect (run 'grunt serve')
/* global module */
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
connect: {
options: {
port: 8000,
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.hostname = "modx"
@trkoch
trkoch / template.rb
Last active August 29, 2015 14:02
Rails Application Template (rSpec, Capybara, Poltergeist, FactoryGirl)
remove_file("test")
gem_group :development, :test do
gem "rspec-rails", "~> 3.0.0"
gem "spring-commands-rspec"
gem "factory_girl_rails", "~> 4.0"
gem "pry-rails"
gem "pry-byebug"
gem "pry-stack_explorer"
gem "pry-rescue"
@trkoch
trkoch / Vagrantfile
Last active August 29, 2015 14:02
Vagrantfile for ubuntu/trusty with Ansible provisioning
# -*- mode: ruby -*-
# vi: set ft=ruby :
require "rbconfig"
require "fileutils"
VAGRANTFILE_API_VERSION = "2"
# Customize
PROJECT = "app"