Skip to content

Instantly share code, notes, and snippets.

View shouse's full-sized avatar

Steven shouse

  • SIVCI
  • Kansas City, MO
View GitHub Profile
@shouse
shouse / Gruntfile.js
Last active August 29, 2015 14:19 — forked from FokkeZB/Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
settings: {
releaseNotes: grunt.option('notes') || 'CI build',
appName: 'Flashlight',
ppUuid: '0253600x-ac6d-35b6-b66d-dd25c4fd956f',
installrAppToken: '6xC0I8SdJA76kW3pqq7GFZLIyq6fBP4Z'
},
var photoDir = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, "photos");
if(!photoDir.exists()) {
photoDir.createDirectory();
}
function takePhoto(e) {
// https://github.com/appcelerator-modules/ti.imagefactory
var ImageFactory = require('ti.imagefactory');
Ti.Media.showCamera({
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
layout: 'vertical'
});
var bt1 = Ti.UI.createButton({title: 'send message (method 1)', top: 200});
bt1.addEventListener('click', function(e)
@shouse
shouse / docker-resources.md
Last active March 10, 2022 04:39 — forked from rgaidot/docker-resources.md
Docker Resources All In One - A collection of docker online resources
@shouse
shouse / osx-for-hackers.sh
Created October 16, 2015 04:27 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'

KVM OSX Guest 10.11 (El Capitan) with Clover

  • Some notes about this approach:
    • An OSX Installer USB drive for Install OS X El Capitan is created
    • Clover is then installed on the USB drive
    • Clover Configurator is then run on the USB drive
    • The USB drive contents are copied to the VM host
    • VNC is used to connect to the guest UI
  • The qxl virtual video device is used (part of the standard kvm qemu install)
@shouse
shouse / ti.dynamiclib.js
Created January 28, 2017 16:18 — forked from hansemannn/ti.dynamiclib.js
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)'
@shouse
shouse / page.indicator.js
Created March 9, 2017 03:38 — forked from giorgiopagnoni/page.indicator.js
Page indicator (circles, lines, squares...) for scrollableViews for Appcelerator Titanium (Android)
/*
* Simple page indicator for scrollableViews for Appcelerator Titanium (Android).
* To be added after the views have been set.
*
* var p = require('page.indicator');
* var options = { color: 'red' };
* var indicator = p.pageIndicator(myScrollableView, options);
*/
@shouse
shouse / titanium-auth-session.js
Created November 7, 2017 21:08 — forked from hansemannn/titanium-auth-session.js
Use Axway Hyperloop to perform OAuth-sessions with the iOS 11+ API "SFAuthenticationSession"
const SFAuthenticationSession = require('SafariServices/SFAuthenticationSession');
const NSURL = require('Foundation/NSURL');
const session = SFAuthenticationSession.alloc().initWithURLCallbackURLSchemeCompletionHandler(
NSURL.alloc().initWithString('https://github.com/login/oauth/authorize?scope=repo&client_id=XXXXX'),
'appcgithub://',
function(url, error) {
if (error != null) {
Ti.API.error('Error performing OAuth: ' + error.localizedDescription);
cb({ success: false, error: 'Error performing OAuth: ' + error.localizedDescription });
@shouse
shouse / appc.js
Created November 12, 2017 01:29 — forked from jkotchoff/appc.js
This Titanium code can be used in an appcelerator project (with Hyperloop enabled) to determine if an iOS advertisement was the cause of the current installation
module.exports = {
hyperloop: {
ios: {
xcodebuild: {
frameworks: [
'iAd'
]
}
}
}