Skip to content

Instantly share code, notes, and snippets.

@jabyrd3
jabyrd3 / app.js
Created May 8, 2014 15:15
app.js
'use strict';
// Declare app level module which depends on filters, and services
angular.module('myApp', [
'ngRoute',
'myApp.filters',
'myApp.services',
'myApp.directives',
'myApp.controllers',
@jabyrd3
jabyrd3 / app.js
Last active August 29, 2015 14:01
reporting
'use strict';
// Declare app level module which depends on filters, and services
angular.module('myApp', [
'ngRoute',
'myApp.filters',
'myApp.services',
'myApp.directives',
'myApp.controllers',
'ngResource',
@jabyrd3
jabyrd3 / say.js
Created May 12, 2014 19:56
say a frasier
var util = require('util');
var fs = require('fs');
var markov = require('markov');
function theCleaner(theText) {
if (theText.slice(-1) !== ('!' || '?' || '.')) {
theText = theText.slice(0, theText.length - 1);
theText += '.';
}
@jabyrd3
jabyrd3 / exampleHeader.json
Last active August 29, 2015 14:01
pisswizard
"Header":{
"Key":{
"Type":"Attribute",
"Title":"BoardName",
"Dimension":"Broker"
},
"Value":{
"Key":{
"Type":"Attribute",
"Title":"BrokerName",
@jabyrd3
jabyrd3 / services.js
Created June 4, 2014 01:06
Quick db abstract for working with cordova / AngularJS
/* Services */
var myApp = angular.module('myApp.services', []);
myApp.service('DB', function($window) {
//var query = 'SELECT DISTINCT(prod_category) FROM prod_master';
var dbConn = $window.sqlitePlugin.openDatabase({
name: "hd_app.sqlite"
});
var chewer = function(tx, res, callback) {
@jabyrd3
jabyrd3 / ugh.js
Created June 5, 2014 15:48
ugh.js
{
"errorCode": 0,
"errorDesc": null,
"Header": {
"Key": {
"Type": "Attribute",
"Title": "FullName",
"Dimension": "Agent"
},
"Value": {
@jabyrd3
jabyrd3 / spinButton.js
Last active August 29, 2015 14:24
quickie directive for buttons
(function () {
'use strict';
/**
<button class="custom"
title="approve"
spin-button
ng-click="approve()"
ng-if="cached.IsApprove"
ng-class="currentItem.asset.RatedOnDateTime ? 'custom approve filled' : 'custom'"
toggle-condition="currentItem.asset.RatedOnDateTime"
@jabyrd3
jabyrd3 / alerts.js
Last active January 4, 2016 22:31
angular simple alerts
(function () {
'use strict';
/* globals _ */
/*
* dismissable alert service
* - purpose
* this directive and service combo provide a reusable method of popping dismissable
* notifications for succesful submissions, errors, warnings, ad nauseam.
*
* - usage
(function () {
'use strict';
/* globals _*/
/* - API access prettifier and standardizer
* we use this service heavily to take some of the pain out of writing api calls all the time.
* it wraps the native angular $http method. It'd be a simple task to write a non-angular specific
* version of this though.
*
* - Sample Usage:
* apiService.users(42).report(18).put({'sample': 'json'}).then(function(response){

Keybase proof

I hereby claim:

  • I am jabyrd3 on github.
  • I am jabyrd3 (https://keybase.io/jabyrd3) on keybase.
  • I have a public key whose fingerprint is F9F5 373E 4B4A EB3A C6D6 78A1 EA2C 669F 3986 5517

To claim this, I am signing this object: