Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Testing IE Compatibility Mode</title>
<script src="ieUserAgent.js" type="text/javascript"></script>
</head>
<body>
<div id="results">Results:</div>
<script type="text/javascript">
var val = "IE" + ieUserAgent.version;
@wickdninja
wickdninja / gist:2d4a00d3c534c63c182b
Created February 27, 2015 06:01
GeoLocation Service
(function() {
'use strict';
angular
.module('geoDemo', [])
.factory('geoService', geoService);
geoService.$inject = ['$rootScope', '$window', '$log'];
function geoService($rootScope, $window, $log) {
/*
Converts A class to a dictionary, used for serializing dictionaries to JSON
Supported objects:
- Serializable derived classes
- Arrays of Serializable
- NSData
- String, Numeric, and all other NSJSONSerialization supported objects
@wickdninja
wickdninja / search.swift
Created July 31, 2015 23:38
Swift Search Snippets
var resultSearchController = UISearchController()
self.resultSearchController = ({
let controller = UISearchController(searchResultsController: nil)
controller.dimsBackgroundDuringPresentation = false
controller.hidesNavigationBarDuringPresentation = true
controller.searchBar.sizeToFit()
self.navigationController?.view = controller.searchBar
self.tableView.contentOffset = CGPointMake(0, CGRectGetHeight(controller.searchBar.frame));
return controller
@wickdninja
wickdninja / FileManager.swift
Created September 10, 2015 18:15
file access swift 1.2
//
// FileManager.swift
// picturepay
//
// Created by Nate on 3/3/15.
// Copyright (c) 2015 alliedpayment. All rights reserved.
//
import Foundation
@wickdninja
wickdninja / .gitconfig
Last active June 20, 2023 15:37 — forked from robmiller/.gitconfig
My git config
[user]
name = TODO
email = TODO
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
span>{{model.amount | currency:'USD':true:'1.2-2'}}</span>
@wickdninja
wickdninja / commit-msg
Created March 23, 2017 13:10
Require Jira Ticket in commit message
#!/bin/sh
# Require Jira Ticket in commit message
KEY="ABP-"
WARNING="Jira ticket reference NOT FOUND but is required!"
MESSAGE=$(<$1)
case "$MESSAGE" in
$KEY*)
exit 0;
;;
@wickdninja
wickdninja / scrape-pr-for-jira.js
Last active May 8, 2017 14:19
Scrape PR page for list of JIRA tickets
/* jshint esversion:6*/
class Scraper {
constructor(keys) {
this.count = 0;
this.output = '\n\n';
this.keys = keys;
}
scrape() {