Skip to content

Instantly share code, notes, and snippets.

Avatar

Heiko Behrens HBehrens

View GitHub Profile
@HBehrens
HBehrens / index.html
Last active May 11, 2021
Search for Memfault YouTrack Issues in text and create Search Link
View index.html
<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))];
View YouTrack-issues.html
<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 Mar 11, 2021
Gitpod: Comparison of environment variables when using Theia vs. VSCode as IDE
View env_theia_vs_code.diff
--- 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 Aug 30, 2017
tslint from Intrinsic Gravelty's editor frontend
View tslint.json
{
"extends": ["tslint-react"],
"rules": {
"align": [
true,
"parameters",
"arguments",
"statements"
],
"ban": false,
View TicToc.js
// 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 Jun 5, 2014
Install pbw with UIDocumentInteractionController
View gist:bb4a52b1d8d57ba4b661
- (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 Aug 29, 2015
PebbleKit-Tests
View PebbleKit.podspec
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 Feb 10, 2014
UISprech WordPress Plugins
View plugins.txt
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 Jan 30, 2014
minimal example to demo PebbleCam's crash on Pebble Firmware 2.0.RC
View fw2_rc_timercrash.c
#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.
View jsbin.inAxajE.css
tr {
height: 42px;
}
td {
width: 40px;
font-size: 32px;
border: 1px solid black;
text-align: center;
vertical-align: middle;