Skip to content

Instantly share code, notes, and snippets.

View shouse's full-sized avatar

Steven shouse

  • SIVCI
  • Kansas City, MO
View GitHub Profile
@hansemannn
hansemannn / ti.dynamiclib.js
Last active July 10, 2017 15:49
Support embedded binaries (aka dynamic libraries) in Titanium modules and Hyperloop
/**
* Ti.DynamicLib
* @abstract Support embedded binaries (aka dynamic libraries) in Titanium modules and Hyperloop.
* @version 1.1.0
*
* Install:
* 1) Search and replace '../../src/<YourFramework>.framework' with your framework location.
The path is relative to the `build/iphone` directory.
* 2a) For classic modules:
* - Add 'LD_RUNPATH_SEARCH_PATHS=$(inherited) "@executable_path/Frameworks" $(FRAMEWORK_SEARCH_PATHS)'
@codefromthecrypt
codefromthecrypt / opentracing-zipkin.md
Last active October 27, 2021 01:44
My ramble on OpenTracing (with a side of Zipkin)

I've had many people ask me questions about OpenTracing, often in relation to OpenZipkin. I've seen assertions about how it is vendor neutral and is the lock-in cure. This post is not a sanctioned, polished or otherwise muted view, rather what I personally think about what it is and is not, and what it helps and does not help with. Scroll to the very end if this is too long. Feel free to add a comment if I made any factual mistakes or you just want to add a comment.

So, what is OpenTracing?

OpenTracing is documentation and library interfaces for distributed tracing instrumentation. To be "OpenTracing" requires bundling its interfaces in your work, so that others can use it to time distributed operations with the same library.

So, who is it for?

OpenTracing interfaces are targeted to authors of instrumentation libraries, and those who want to collaborate with traces created by them. Ex something started a trace somewhere and I add a notable event to that trace. Structure logging was recently added to O

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@hansemannn
hansemannn / titanium-cli-hook.js
Last active February 3, 2018 03:14
Use Titanium CLI hooks to manipulate the .pbxproj file
'use strict';
exports.id = 'com.appcelerator.myplugin';
exports.cliVersion = '>=3.2';
exports.init = init;
/**
* main entry point for our plugin which looks for the platform specific
* plugin to invoke
*/
@hansemannn
hansemannn / SwitchHapticFeedback.js
Last active August 25, 2017 03:13
Haptic Feedback on iOS 10, iPhone 7 and Titanium SDK 6.0.0+
var win = Ti.UI.createWindow({
backgroundColor: "#fff"
});
var slider = Ti.UI.createSlider({
min: 0,
max: 100,
width: 200
});
@michaellihs
michaellihs / tmux-cheat-sheet.md
Last active May 8, 2025 19:22
tmux Cheat Sheet
var Button = require("android.widget.Button"),
LayoutParams = require('android.widget.FrameLayout.LayoutParams'),
Activity = require('android.app.Activity'),
Color = require('android.graphics.Color'),
TypedValue = require('android.util.TypedValue'),
Gravity = require('android.view.Gravity'),
OnClickListener = require('android.view.View.OnClickListener'),
currentActivity = new Activity(Ti.Android.currentActivity);
// Create a new Button object with your current activity
@hansemannn
hansemannn / beacons.js
Last active November 13, 2017 15:47
Discover iBeacons with Hyperloop
var CLBeaconRegion = require("CoreLocation/CLBeaconRegion"),
NSUUID = require("Foundation/NSUUID"),
CLLocationManager = require("CoreLocation/CLLocationManager"),
CLProximityFar = require("CoreLocation").CLProximityFar,
CLProximityNear = require("CoreLocation").CLProximityNear,
CLProximityImmediate = require("CoreLocation").CLProximityImmediate,
CLProximityUnknown = require("CoreLocation").CLProximityUnknown,
UILocalNotification = require("UIKit/UILocalNotification"),
UIApplication = require("UIKit/UIApplication"),
locationManager;
@grantges
grantges / sphero.js
Created June 23, 2016 22:50
An Appcelerator Hyperloop module (Android) for working with the Sphere robot
var ConvenienceRobot = require('com.orbotix.ConvenienceRobot');
var DualStackDiscoveryAgent = require('com.orbotix.DualStackDiscoveryAgent');
var Robot = require('com.orbotix.common.Robot');
var DiscoveryException = require('com.orbotix.common.DiscoveryException');
var RobotChangedStateListener = require('com.orbotix.common.RobotChangedStateListener');
var RobotLE = require('com.orbotix.le.RobotLE');
var Context = require('android.content.Context');
var DeviceSensorAsyncMessage = require('com.orbotix.async.DeviceSensorAsyncMessage');
var ConfigureLocatorCommand = require('com.orbotix.command.ConfigureLocatorCommand');
var ResponseListener = require('com.orbotix.common.ResponseListener');
@davidcyp
davidcyp / background_demo.js
Created April 7, 2016 20:49 — forked from kosso/background_demo.js
Background Service notification for Titanium
/* Kosso : March 12th 2011
This the only way I managed to do this without the app crashing on resume.
Done slightly differently to the KS example, since they unregister the service and
do not use a setInterval timer.
*/
//############ in app.js :
// test for iOS 4+