Skip to content

Instantly share code, notes, and snippets.

View kacole2's full-sized avatar

Kendrick Coleman kacole2

View GitHub Profile
@kacole2
kacole2 / photonquickstart.sh
Created May 12, 2015 02:16
VMware Photon Quick Start Bash
#!/bin/sh
echo Changing SSH for Root login
sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/ssh/sshd_config
systemctl restart sshd
systemctl enable sshd
echo Starting Docker Services
systemctl start docker
systemctl enable docker
@kacole2
kacole2 / db.js
Last active August 29, 2015 14:16
mongodb and cloud foundry
var mongoose = require('mongoose'),
cfenv = require("cfenv");
var appEnv = cfenv.getAppEnv()
var mongoLabUrl = appEnv.getServiceURL('my-mongo-database');
if (mongoLabUrl == null) {
//local or prod development
mongoose.connect('mongodb://localhost/my-mongo-database');
} else {
//cloud foundry
@kacole2
kacole2 / the_jQ.js
Created December 2, 2014 14:26
tagging functionality using jQuery
<!-- The hidden div -->
<div class="hiddenUL">
</div>
<!-- This is a section of list items. There can be multiple unordered lists as long as the class is the same -->
<ul class="item_box">
<li class="ViPR SDK Ruby">
<a href="https://github.com/nctiggy/Vipruby">
<div class="item_bg" style="background: url(images/items/vipruby.png) no-repeat center center; background-size: cover;">
<h2>ViPRuby</h2>
@kacole2
kacole2 / clock.rb
Last active June 16, 2016 16:59
Creating a worker with clockwork on cloudfoundry
#Read the how-to at http://www.kendrickcoleman.com/
#this is the clockwork configuration file
require File.expand_path('../../config/boot', __FILE__)
require File.expand_path('../../config/environment', __FILE__)
require 'clockwork'
include Clockwork
every(30.seconds, 'Running my reoccurring process...') { SiteDatum.myreoccurringprocess }
@kacole2
kacole2 / gist:0797d92debd203790aa1
Created November 16, 2014 19:24
Phonegap not working on device
kcoleman-mbp:jsmap1 kcoleman$ phonegap run ios
[phonegap] detecting iOS SDK environment...
[phonegap] using the local environment
[phonegap] compiling iOS...
Build settings from command line:
ARCHS = i386
CONFIGURATION_BUILD_DIR = /Users/kcoleman/Documents/Aptana Studio 3 Workspace/jsmap1/platforms/ios/build/emulator
SDKROOT = iphonesimulator8.1
VALID_ARCHS = i386
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<link href='http://fonts.googleapis.com/css?family=Lobster|Quattrocento+Sans:400,700' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="cordova.js"></script>
@kacole2
kacole2 / CSS
Created November 3, 2014 13:42
Phonegap Cordova Geolocation with Google Maps Javascript API v3
* {
-webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
}
html, body {
width: 100%;
height: 100%;
padding-top: 10%;
}
@kacole2
kacole2 / gist:b7d7c521f1c09a6c9686
Created October 30, 2014 20:30
phonegap/cordova build ios failure [entire log]
coleman-mbp:Aptana Studio 3 Workspace kcoleman$ phonegap create newmap5 com.kendrickcoleman.newmap5 newmap5
[phonegap] missing library com.kendrickcoleman.newmap5/www/3.6.0
[phonegap] downloading https://github.com/phonegap/phonegap-app-hello-world/archive/3.6.0.tar.gz...
[phonegap] create called with the options /Users/kcoleman/Documents/Aptana Studio 3 Workspace/newmap5 com.kendrickcoleman.newmap5 newmap5
[phonegap] Customizing default config.xml file
[phonegap] created project at /Users/kcoleman/Documents/Aptana Studio 3 Workspace/newmap5
kcoleman-mbp:Aptana Studio 3 Workspace kcoleman$ cd newmap5/
kcoleman-mbp:newmap5 kcoleman$ cordova build ios
No platforms added to this project. Please use `cordova platform add <platform>`.
kcoleman-mbp:newmap5 kcoleman$ phonegap build ios
@kacole2
kacole2 / gist:7031da2b1305e6bd3c25
Created October 30, 2014 15:55
ios phonegap google maps error 4
kcoleman-mbp:newmap4 kcoleman$ phonegap run ios
[phonegap] detecting iOS SDK environment...
[phonegap] using the local environment
[phonegap] compiling iOS...
Build settings from command line:
ARCHS = i386
CONFIGURATION_BUILD_DIR = /Users/kcoleman/Documents/Aptana Studio 3 Workspace/newmap4/platforms/ios/build/emulator
SDKROOT = iphonesimulator8.1
VALID_ARCHS = i386
@kacole2
kacole2 / gist:34bf2a5ad24d4af9c519
Created October 30, 2014 15:51
ios phonegap google maps error 3
CompileC build/newmap4.build/Debug-iphonesimulator/newmap4.build/Objects-normal/i386/External.o newmap4/Plugins/plugin.google.maps/External.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd "/Users/kcoleman/Documents/Aptana Studio 3 Workspace/newmap4/platforms/ios"
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/kcoleman/.rvm/gems/ruby-2.1.2/bin:/Users/kcoleman/.rvm/gems/ruby-2.1.2@global/bin:/Users/kcoleman/.rvm/rubies/ruby-2.1.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/kcoleman/.rvm/bin:/Users/kcoleman/Library/android-sdk-macosx/tools:/Users/kcoleman/Library/android-sdk-macosx/platform-tools"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch i386 -fmessage-length=202 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -f