Skip to content

Instantly share code, notes, and snippets.

View FokkeZB's full-sized avatar
*️⃣
Zappin'

Fokke Zandbergen FokkeZB

*️⃣
Zappin'
View GitHub Profile

Keybase proof

I hereby claim:

  • I am fokkezb on github.
  • I am fokkezb (https://keybase.io/fokkezb) on keybase.
  • I have a public key ASACRlfa-rxPMFJo9GKf6-t866_oNVhZG4bXLkGu8I_UoQo

To claim this, I am signing this object:

@FokkeZB
FokkeZB / script.js
Last active March 6, 2019 20:05
Let a script loaded before Intercom wait until intercom has booted
function afterIntercom() {
if (window.intercomSettings.is_intercom_bubble_enabled && window.intercomSettings.is_intercom_twoway_enabled) {
// do something
}
}
if (window.intercomSettings) {
afterIntercom();
} else {
Object.defineProperty(window, 'intercomSettings', {
@FokkeZB
FokkeZB / MyController.swift
Last active December 1, 2015 11:40
How to extend WKInterfaceImage with a method to load remote images on watchOS
import WatchKit
public extension WKInterfaceImage {
public func setImageWithUrl(url:String, scale: CGFloat = 1.0) -> WKInterfaceImage? {
NSURLSession.sharedSession().dataTaskWithURL(NSURL(string: url)!) { data, response, error in
if (data != nil && error == nil) {
let image = UIImage(data: data!, scale: scale)
@FokkeZB
FokkeZB / git-heroes.md
Last active October 30, 2015 08:25
Release 5.1.0 Statistics
@FokkeZB
FokkeZB / Package Control.sublime-settings
Last active August 29, 2015 14:27
Sublime Text Configuration
{
"in_process_packages":
[
],
"installed_packages":
[
"Compare Side-By-Side",
"DashDoc",
"DoxyDoxygen",
"Fizzy Theme",
@FokkeZB
FokkeZB / app.js
Created April 11, 2015 20:36
Test
var w = Ti.UI.createWindow({backgroundColor:'green'});
w.open();
@FokkeZB
FokkeZB / Gruntfile.js
Last active June 3, 2016 17:16
Grunt for publishing Arrow apps
module.exports = function (grunt) {
grunt.initConfig({
clean: {
node: ['node_modules']
},
spawn: {
unpublish: {
command: 'appc',
args: ['unpublish']
@FokkeZB
FokkeZB / console.js
Last active October 27, 2015 23:35
Get all GitHub usernames on a GitHub page
// Array
$('.aname').map(function(){return $(this).text();}).get();
// One per line
$('.aname').map(function(){return $(this).text();}).get().join('\n');
// CSV
$('.aname').map(function(){return $(this).text();}).get().join(',');
@FokkeZB
FokkeZB / !README.md
Last active April 13, 2016 14:28
Facebook's css-layout for Titanium

Facebook's css-layout for Titanium

Exploring how it could be used to have a more iOS-autolayout-like layout system on Titanium.

Getting the script to work

  1. Put Layout.js in app/lib.
  2. Put the below computeLayout.js in app/lib to fix this.
  3. Use the below alloy.js and confirm it to work.
@FokkeZB
FokkeZB / README.md
Last active August 29, 2015 14:13
Preparing restored iCloud Calendar Events to be imported in a new Calendar