Skip to content

Instantly share code, notes, and snippets.

View ofhouse's full-sized avatar
🚀
Never Come Down.

Felix Haus ofhouse

🚀
Never Come Down.
View GitHub Profile
@ofhouse
ofhouse / 08.11.2010 - main.cpp
Created November 8, 2010 18:33
Kontoverwaltung mit Template
#include "stdafx.h"
#include "Kunde.h"
int _tmain(int argc, _TCHAR* argv[])
{
CKunde objKunde("Schulze");
int nr;
@ofhouse
ofhouse / shiny-password.R
Last active June 19, 2020 10:06
Simple password authentication for a shiny app
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
@ofhouse
ofhouse / iconv-patch.js
Created March 18, 2019 11:19
Patch for the `encoding` npm-package to use with webpack. (From: https://github.com/andris9/encoding/issues/18#issuecomment-319721150)
// IIFE
(function() {
'use strict';
// node
var fs = require('fs');
var path = require('path');
// Patch encoding module due to iconv issues -> make it use iconv-lite
/* polyfills.js */
import 'react-app-polyfill/ie11';
import 'core-js/features/array/find';
import 'core-js/features/array/includes';
import 'core-js/features/number/is-nan';
@ofhouse
ofhouse / README.md
Last active December 7, 2019 15:05
KeepassXC Browser NativeMessagingHosts

Missing org.keepassxc.keepassxc_browser.json on Ubuntu

After installing the KeepassXC Browser extension in Google Chrome, it failed to connect to the KeepassXC Application. Checking the ~/.config/google-chrome/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json file as described in the Troubleshooting guide I noticed that the file is missing. So simple create this file and paste the content from the org.keepassxc.keepassxc_browser.json file from this gist and restart the browser to make it work again.

KeepassXC from snap store

When using KeepassXC from the snap store, it usually does not create the keepassxc-proxy binary, because it's keepassxc.proxy here. To fix this, create the file keepassxc-proxy in /usr/bin/keepassxc-proxy with the following content:

@ofhouse
ofhouse / PowerShell Autocomplete.md
Last active December 27, 2019 15:47
PowerShell bash-like autocomplete

Add bash-like autocomplete to PowerShell

  1. Add or open your PowerShell profile (to make the changes permanent)
ii $PROFILE.CurrentUserAllHosts
  1. Add the following lines
# Tab autocomplete
@ofhouse
ofhouse / curves.py
Last active December 30, 2019 17:45
Blender helper scripts
# Copies the length of the selected curve to the clipboard
import bpy
import subprocess
def copy2clip(txt):
cmd='echo '+str(txt).strip()+'|clip'
return subprocess.check_call(cmd, shell=True)
length = bpy.context.object.data.splines.active.calc_length()
copy2clip(length)
@ofhouse
ofhouse / install-java-versions.md
Created October 13, 2020 15:16
Install and manage multiple Java SDK versions on Ubuntu

Install and manage multiple Java versions on Ubuntu

This guide shows per example the installation of the Java SDK versions 8 (LTS, already installed) and 11 (LTS).

1. Check which Java versions are avaialable or already installed

apt --names-only search "openjdk-.*jre$"

> Sorting... Done
@ofhouse
ofhouse / lambda-bridge.js
Last active January 4, 2021 14:44
Reference implementation how to start a Next.js webserver inside a Lambda from API Gateway invocation
// Reference implementation how to start a Next.js webserver inside a Lambda
// from API Gateway invocation
// https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
const { request } = require('http');
// Import the generated Next.js server from somewhere
const NextServer = require('./dist');
exports.handler = async function (event) {
@ofhouse
ofhouse / main.tf
Last active January 4, 2021 16:08
Initial Terraform template for Next.js module for AWS
# main.tf
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.0"
}
}
}