Skip to content

Instantly share code, notes, and snippets.

@adamalex
adamalex / index.html
Created March 19, 2014 22:34
Simple Map Location
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
</head>
<body>
<div id="content" style="height: 450px"></div>
<script type="text/javascript">
@adamalex
adamalex / CoreOScron.md
Last active August 29, 2015 14:03
CoreOS units for cron-like behavior
  1. fleetctl load *
  2. fleetctl start *.timer
-- Logs begin at Wed 2014-07-02 01:34:27 UTC, end at Wed 2014-07-02 01:51:41 UTC. --
Jul 02 01:34:42 corecluster systemd[1]: Starting fleet...
Jul 02 01:34:42 corecluster systemd[1]: Started fleet.
Jul 02 01:34:42 corecluster fleet[3542]: I0702 01:34:42.099837 03542 fleet.go:143] No provided or default config file found - proceeding without
Jul 02 01:34:42 corecluster fleet[3542]: I0702 01:34:42.107270 03542 agent.go:80] Initializing Agent
Jul 02 01:36:17 corecluster fleet[3542]: fatal error: runtime: cannot allocate memory
Jul 02 01:36:17 corecluster fleet[3542]: goroutine 1 [running]:
Jul 02 01:36:17 corecluster fleet[3542]: runtime.throw(0xb2f347)
Jul 02 01:36:17 corecluster fleet[3542]: /usr/lib/go/src/pkg/runtime/panic.c:464 +0x69 fp=0x7fcfb6479030
Jul 02 01:36:17 corecluster fleet[3542]: runtime.persistentalloc(0x4000, 0x8, 0xb3d938)
@adamalex
adamalex / cloud_config.yml
Created August 4, 2014 23:25
Secure CoreOS config for Rackspace
#cloud-config
coreos:
etcd:
# generate a new token for each unique cluster from https://discovery.etcd.io/new
discovery: https://discovery.etcd.io/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
update:
# disable this for now until it is supported when using private ip config
reboot-strategy: off
units:
@adamalex
adamalex / keybase.md
Created October 4, 2014 21:49
keybase.md

Keybase proof

I hereby claim:

  • I am adamalex on github.
  • I am adamalex (https://keybase.io/adamalex) on keybase.
  • I have a public key whose fingerprint is AA1C 23AB BEE8 36B5 9EF6 0002 D6A4 3CFA 39C0 4BA8

To claim this, I am signing this object:

web:
image: tutum/hello-world:latest
ports:
- "80:80"
@adamalex
adamalex / index.html
Created April 13, 2013 18:42
Testing Fuel UX issue #93
<!DOCTYPE html>
<html class="fuelux">
<head>
<title>Datagrid Example</title>
<link href="https://fuelcdn.com/fuelux/2.2/css/fuelux.min.css" rel="stylesheet" type="text/css">
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src="http://fuelcdn.com/fuelux/2.2/loader.min.js"></script>
<script>
// SETCOLUMNWIDTHS OVERRIDE
@adamalex
adamalex / index.html
Created April 17, 2013 20:50
automated test example
<!DOCTYPE html>
<html>
<head>
<title>automated test example</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.0.0/backbone-min.js"></script>
</head>
<body>
@adamalex
adamalex / ko-datagrid.js
Created June 7, 2013 00:24
Using Knockout to attach a Fuel UX datagrid to an element
// KO binding for attaching a Fuel UX datagrid to an element
ko.bindingHandlers.dataGrid = {
init: function (element, valueAccessor) {
$(element).datagrid({ dataSource: valueAccessor() });
}
};
// Usage:
//
// getGridDataSource should return an instance of a datasource
FROM ubuntu:quantal
MAINTAINER Adam Alexander <adamalex@gmail.com>
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y wget
RUN wget -nv http://45ec19d3127bddec1c1d-e57051fde4dbc9469167f8c2a84830dc.r36.cf1.rackcdn.com/strongloop-node_1.1.0-1_amd64.deb