Skip to content

Instantly share code, notes, and snippets.

View kacole2's full-sized avatar

Kendrick Coleman kacole2

View GitHub Profile
<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 / 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
@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 / 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 / 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 / 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 / beers.go
Created August 19, 2015 18:30
random number generator used to choose beers at Chuck's Hop Shop in Seattle
package main
import (
"fmt"
"math/rand"
"time"
)
func random(min, max int) int {
rand.Seed(time.Now().Unix())
@kacole2
kacole2 / .travis.yml
Created December 10, 2015 00:39
Travis CI to update websites via FTP by thinking it's a Node.js app
language: node_js
node_js:
- "0.11"
# whitelist
branches:
only:
- master
env:
global:
- secure: h6i/QFDLprVJe7u/ZT...
@kacole2
kacole2 / directions.md
Last active December 29, 2015 07:12
RackHD Docker Installation WIP

RackHD Docker Installation WIP

This assumes you have a machine available, created with Docker Machine and VirtualBox

Create the docker images

Go into each folder with the Dockerfile and create the image. ie cd on-tftp.

Create the image with the tag:

  1. docker build -t rackhd/on-tftp .
@kacole2
kacole2 / docker-machine_rexray_auto-install.sh
Created January 9, 2016 18:48
Install REX-Ray on Multiple Hosts Created With Docker Machine
#!/bin/bash
# Read more about REX-Ray storage persistance:
# https://github.com/emccode/rexray
# change the filter and grep to anything you want to search for.
# This example shows searching for the name of machines beginning with "dev"
# You can sort by driver or swarm instance, just change the awk column as well
ALLHOSTS=$(docker-machine ls --filter name=dev* | grep dev* | awk '{print $1}')