Skip to content

Instantly share code, notes, and snippets.

View application.jade
.applyPage.row(ng-controller="applyController as apply")
.col-lg-offset-1.col-lg-10.animated.fadeInDown(ng-show="apply.applied")
.row.text-center
h1 Thanks for applying!
p Your application is being processed. You'll receive a response shortly from one of our program coordinators with more information.
// p You can check on the status of your application by logging into the applicant portal
// a(href="/login") here.
// p Your username is your email address and your password is the one sent to you in your email.
// p Can't find your password?  
// a(href="/forgotpassword") You can reset it here.
View application.js
angular.module('us.propl.app')
.controller('applyController', function($http, localStorageService) {
// var AppResource = $resource('/api/apply');
// this.applied = localStorageService.get('applied');
this.applied = false;
var that = this;
this.submit = function() {
this.application.username = this.application.email;
$http.post("/api/apply", this.application)
.then(function(applicationResponse) {
View coase.tz
Contract:
{ parameter (or (or nat nat) (pair nat address)) ;
storage (pair (pair (map nat (pair mutez nat)) (map nat (pair address nat))) nat) ;
code { {} ;
{ { {} ;
{ {} ;
PUSH (lambda
(pair (pair nat address)
(pair (pair (map nat (pair mutez nat)) (map nat (pair address nat))) nat))
(pair (list operation)
@sax1johno
sax1johno / KubernetesNamespaceForceFinalize.txt
Last active Aug 30, 2018
Fix for Kubernetes Namespace being stuck in the "Terminating" state
View KubernetesNamespaceForceFinalize.txt
# Sometimes, when you attempt to delete a namespace in kubernetes, it can get stuck in the "terminating" state.
# This generally happens when there are resources still assigned to that namespace when it is deleted.
# The finalizers are unable to confirm that all resources are cleared out, so they fail and stay locked in the "terminating" state.
# You can fix it by doing the following:
# First, proxy the kubernetes api cluster to your local system
$ kubectl serve
# find each namespace impacted
$ kubect get namespace <ns> -o json > temp.json
@sax1johno
sax1johno / README.md
Created Aug 29, 2016
Cached Astronomy Picture of the Day
View README.md

This flow will download the latest Astronomy Picture of the Day (APOD) from Nasa.gov and caches in memory.

It hits the API once every 24 hours, so you don't have to worry about reaching your quota.

This flow demonstrates a technique in caching data that can be used for other sites as well - for example, you can create your own "xxx of the day" from any site that offers a random API by simply calling that random API once every 24 hours (you can change this interval) and caching the result. Calls to the API will read from the cached version.

NOTE: to use this flow you must obtain a free API key from data.nasa.gov.

View Rancher 1.x Docker Run on AWS
docker run -d --restart=unless-stopped -p 8080:8080 -p 9345:9345 rancher/server \
--db-host <hostName> --db-port 3306 --db-user <username> --db-pass <password> --db-name rancher_cattle \
--advertise-address awslocal
View Math.uuid.js
/*!
Math.uuid.js (v1.4)
http://www.broofa.com
mailto:robert@broofa.com
Copyright (c) 2010 Robert Kieffer
Dual licensed under the MIT and GPL licenses.
*/
/*
@sax1johno
sax1johno / Nativescript-WebViewWithLinks.js
Created Aug 12, 2016
Code in NativeScript to overload URL's in a rendered web page and display them in a content-appropriate way.
View Nativescript-WebViewWithLinks.js
View UIBModalExample.html
<html>
<head>
</head>
<body>
<div ng-controller="PageController">
<button value="Click to open modal" ng-click="openModal" />
</div>
<script type="text/template" id="myModalTemplate.html">
<h1>This is my modal popup template</h1>
<input type="text" ng-model="user.username" />
View rancher docker-compose with mysql
master:
image: rancher/server
container_name: master
volumes_from:
- mysql
ports:
- "8080:8080"
links:
- mysql
environment:
You can’t perform that action at this time.