I hereby claim:
- I am bradberger on github.
- I am bradberger (https://keybase.io/bradberger) on keybase.
- I have a public key whose fingerprint is 077F FE20 030D 6133 D806 AFBB ECCA B1EF 2B12 7003
To claim this, I am signing this object:
#!/bin/bash | |
sudo rm -rf /opt/go | |
wget -qO- https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz | sudo tar xz -C /opt |
import ( | |
"os" | |
"github.com/bradberger/gowhmcs" | |
) | |
func main() { | |
api, err := whmcs.NewAPI(os.Getenv("WHMCS_ENDPOINT"), os.Getenv("WHMCS_USER"), os.Getenv("WHMCS_PASSWORD")) | |
if err != nil { |
package main | |
import ( | |
"fmt" | |
"crypto/md5" | |
) | |
func GetMD5Hash(s string) string { | |
return fmt.Sprintf("%x", md5.Sum([]byte(s))) | |
} |
I hereby claim:
To claim this, I am signing this object:
// This file is correct version, but is not built dev_appserver because of a | |
// bug in the SDK. | |
// +build !appengine | |
package broker | |
import ( | |
"encoding/json" | |
"errors" |
angular.module('chargeback', ['ui.router', 'upload', 'ngAnimate']) | |
// Lots of code before the directive... | |
.directive('test', ['$filter', function($filter){ | |
// This should handle and input and return 0 or a valid float. | |
function toFloat(val){ | |
var f = parseFloat(val || 0) | |
return isFinite(f) ? f : 0; | |
} |
<!DOCTYPE html> | |
<html ng-app="testApp"> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style> | |
.container { | |
position: fixed; | |
bottom: 0; |
/** | |
* @description A simple check to ensure a number is not zero. Sets the "zero" validation accordingly. | |
* @usage <input ng-model="myModel" not-zero> | |
*/ | |
angular.module("app").directive("notZero", function() { | |
var linkFunc = function(scope, element, attrs, ngModel) { | |
var zeroValidator = function(value) { | |
var num = parseFloat(value); |
"use strict"; | |
/** | |
* @description A simple formatter for <input type="checkbox"> fields. | |
* @usage <input type="checkbox" ng-model="myCheckbox" boolean> | |
*/ | |
angular.module("clls").directive("boolean", function() { | |
return { | |
require: "ngModel", | |
link: function(scope, element, attrs, ngModel) { |