Skip to content

Instantly share code, notes, and snippets.

@bdentino
bdentino / Blank snippet.EXCEL.yaml
Last active September 24, 2020 17:57
MRE of bug in chrome with GetStartupBehavior
name: Blank snippet
description: Create a new snippet from a blank template.
host: EXCEL
api_set: {}
script:
content: |
$("#run").click(() => tryCatch(run));
async function run() {
console.log("Custom Functions", Office.context.requirements.isSetSupported("CustomFunctionsRuntime", "1.1"))
@bdentino
bdentino / slack-bash
Created August 17, 2016 04:54
bash script that sends slack messages from the command line
#! /bin/bash
#
# Credit where credit is due:
# This is a (very) lightly modified version of the original
# slacktee script found here:
# https://github.com/course-hero/slacktee
# ----------
# Default Configuration
# ----------
@bdentino
bdentino / papertrail.js
Created January 17, 2015 22:27
papertrail console middleware
var trails = [];
var util = require('util');
intercept_console(function(string, encoding, fd) {
trails.forEach(function(papertrail) {
papertrail(string);
})
})
var papertrail = module.exports = function(options) {
@bdentino
bdentino / github-badge.jade
Created December 8, 2014 06:23
Simple Jade template to render an svg image similar to those used as 'badges' in GitHub README files
doctype xml
- var appWidth = 80 + app.length * 70
- var detailX = appWidth + 60
- var detailWidth = 90 + detail.length * 70
- var totalWidth = appWidth + detailWidth
- var scale = 0.1
- var scaledWidth = totalWidth * scale;
- var scaledHeight = 200 * scale
- var border = 24
@bdentino
bdentino / gist:4870ed563039e1a4c789
Created October 9, 2014 05:05
Facebook Native Share Dialog
public void shareOpenGraphStory(Intent intent) {
OpenGraphObject obj = OpenGraphObject.Factory.createForPost("qtino-sharing:git_repo");
obj.setType("qtino-sharing:git_repo");
obj.setTitle("Testing OpenGraph Share");
Log.w("FBShareActivity", "Object type is " + obj.getType());
OpenGraphAction action = GraphObject.Factory.create(OpenGraphAction.class);
action.setType("og.likes");
action.setProperty("object", obj);
@bdentino
bdentino / gist:9592701
Created March 17, 2014 02:02
Qt 5.3.0-alpha undefined symbols during qtdeclarative build
Undefined symbols for architecture armv7:
"_CGRectZero", referenced from:
-[QUIView(TextInput) firstRectForRange:] in libqios.a(qioswindow.o)
"_CGAffineTransformIsIdentity", referenced from:
-[QUIView layoutSubviews] in libqios.a(qioswindow.o)
"QEventDispatcherCoreFoundation::registerTimer(int, int, Qt::TimerType, QObject*)", referenced from:
vtable for QIOSEventDispatcher in libqios.a(moc_qioseventdispatcher.o)
"_OBJC_CLASS_$_CAEAGLLayer", referenced from:
objc-class-ref in libqios.a(qioswindow.o)
"QEventDispatcherCoreFoundation::unregisterTimer(int)", referenced from:
@bdentino
bdentino / gist:9592695
Created March 17, 2014 02:01
Qt 5.3.0-alpha build errors (qtbase) compiling for iOS
/Users/bdentino/Qt/5.3.0a/Source/qtbase/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm:542:43: error: use of undeclared identifier 'kATSFontContextLocal'
kATSFontContextLocal, kATSFontFormatUnspecified, NULL,
^
/Users/bdentino/Qt/5.3.0a/Source/qtbase/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm:545:19: error: variable has incomplete type 'FSRef'
FSRef ref;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h:467:8: note: forward declaration of 'FSRef'
struct FSRef;
^
/Users/bdentino/Qt/5.3.0a/Source/qtbase/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm:566:43: error: call to unavailable function 'CTFontCreateWithPlatformFont': not available on iOS