Skip to content

Instantly share code, notes, and snippets.

View HBehrens's full-sized avatar

Heiko Behrens HBehrens

View GitHub Profile
@HBehrens
HBehrens / index.html
Last active May 11, 2021 23:06
Search for Memfault YouTrack Issues in text and create Search Link
<textarea id="input" placeholder="Paste text with issue ids with the pattern MFLT-1234" rows="10"
style="display: block; width:100%"></textarea>
<a id="link" href="">Click me</a>
<script>
const textArea = document.getElementById("input");
const linkElement = document.getElementById("link");
function updateLink() {
const issueMatches = [...textArea.value.matchAll((/\bMFLT-\d+/g))];
<textarea id="input" placeholder="Paste text with issue ids with the pattern MFLT-1234" rows="10"
style="display: block; width:100%"></textarea>
<a id="link" href="">Click me</a>
<script>
const textArea = document.getElementById("input");
const linkElement = document.getElementById("link");
function updateLink() {
const issueMatches = [...textArea.value.matchAll((/\bMFLT-\d+/g))];
@HBehrens
HBehrens / env_theia_vs_code.diff
Created March 11, 2021 08:45
Gitpod: Comparison of environment variables when using Theia vs. VSCode as IDE
--- 2021-03-11 08:33:26 +0000
+++ 2021-03-11 08:33:26 +0000
@@ -1,20 +1,21 @@
APACHE_DOCROOT_IN_REPO=public
BROWSER=gp-preview
CARGO_HOME=/workspace/.cargo
+COLORTERM=truecolor
CUSTOM_XVFB_WxHxD=220x240x16
DISPLAY=:0
DOCKER_CONTEXT_SOURCE=.gitpod.docker
@HBehrens
HBehrens / tslint.json
Created August 30, 2017 16:46
tslint from Intrinsic Gravelty's editor frontend
{
"extends": ["tslint-react"],
"rules": {
"align": [
true,
"parameters",
"arguments",
"statements"
],
"ban": false,
@HBehrens
HBehrens / TicToc.js
Last active October 25, 2016 18:06
// book keeping so that we can easily animate the two hands for the watchface
// .scale/.angle are updated by tween/event handler (see below)
var renderState = {
minute: {style: 'white', scale: 0.80, angle: 0},
hour: {style: 'red', scale: 0.51, angle: 0}
};
// helper function for the draw function (see below)
// extracted as a standalone function to satisfy common believe in efficient JS code
// TODO: verify that this has actually any effect on byte code level
@HBehrens
HBehrens / gist:bb4a52b1d8d57ba4b661
Created June 5, 2014 02:17
Install pbw with UIDocumentInteractionController
- (void)deployToPebbleControl:(UIView *)control delegate:(id<UIDocumentInteractionControllerDelegate>)delegate {
NSString *baseName = @"peebhole-1_x";
#if !TARGET_IPHONE_SIMULATOR
PBFirmwareVersion *version = PEBAppDelegate.instance.watch.versionInfo.runningFirmwareMetadata.version;
if(version.os >= 2) {
baseName = @"peebhole-2_x";
}
@HBehrens
HBehrens / PebbleKit.podspec
Last active August 29, 2015 14:01
PebbleKit-Tests
Pod::Spec.new do |s|
s.name = "PebbleKit"
s.version = "2.1.1"
s.summary = "Embed PebbleKit iOS into your app to communicate with Pebble"
s.homepage = "http://developer.getpebble.com"
s.license = {
:type => 'Commercial',
:text => <<-LICENSE
© 2014 Pebble Technology Corp. All rights reserved.
LICENSE
@HBehrens
HBehrens / plugins.txt
Created February 10, 2014 10:47
UISprech WordPress Plugins
add-meta-tags
akismet
flattr
podlove-podcasting
shareadraft
w3-total-cache
admin-in-english
archivist
custom-permalinks
google-sitemap-generator
@HBehrens
HBehrens / fw2_rc_timercrash.c
Created January 30, 2014 09:43
minimal example to demo PebbleCam's crash on Pebble Firmware 2.0.RC
#include <pebble.h>
/*
This is a minimal example to demo PebbleCam's crash on Pebble Firmware 2.0.RC
Even though the logs state an issue with cancel_timer, it's really an issue
with window_raw_click_subscribe on BUTTON_ID_UP and menu_layer_set_click_config_onto_window
on the sub window. Change any of those and the crash is gone.
tr {
height: 42px;
}
td {
width: 40px;
font-size: 32px;
border: 1px solid black;
text-align: center;
vertical-align: middle;