This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// setup a loading dialog | |
function showLoader() { | |
$('body').append('<div id="dialog-loading"></div>'); | |
$("#dialog-loading").dialog({ | |
height: 35, | |
draggable: false, | |
resizable: false, | |
modal: true | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Property Item 36867 corresponds to the Date Taken | |
public static readonly int DateItem = 36867; | |
static public DateTime? GetDateTaken(Image targetImg) { | |
DateTime? created; | |
try | |
{ | |
PropertyItem propItem = targetImg.GetPropertyItem(DateItem); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///////////////////////////////////////////////////////////////////////////////////// javascript | |
$('a.delete').live('click', function () { | |
var id = $('p#item-id').val(); | |
$.ajax({ | |
url: '/path/to/controller/delete', | |
type: "POST", | |
traditional: true, | |
data: { 'id': id }, | |
success: function (html) { | |
$(this).fadeOut('slow').remove(); //Hide deleted row in DOM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@* Requires jQuery and jQuery UI *@ | |
@if (this.Request.IsAuthenticated) { | |
int sessionDialogWait = 2 * 60 * 1000 - 60 * 500; // ms = 1.5 minutes | |
int sessionTimeout = 15 * 60 * 1000; // ms = 15 minutes | |
if (ViewData["sessionTimeout"] != null) { | |
sessionTimeout = ((int)ViewData["sessionTimeout"] * 60 - 120) * 1000; | |
} | |
<script type="text/javascript"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img id="slideImg_2" data-loc="http://c413794.r94.cf1.rackcdn.com/pages/02_intro.jpg" class="load_later" alt="Alta, UT" /> | |
$('.load_later').each(function (index) { | |
var target = this; | |
var id = $(this).attr("id"); | |
setTimeout(function () { late_image(target, id) }, 1000 + (130 * index)); | |
}); | |
function late_image(target, id) { | |
if ( localStorage.getItem(id)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
############################################## | |
# This creates an incremental backup. | |
# Backups are uploaded to GoogleDrive | |
# http://tech.rgou.net/en/linux-2/backup-script-on-google-drive-for-linux/ | |
# | |
# A cron job should run this daily | |
# 0 2 * * * sh /home/bcalloway/scripts/system_incremental_backup.sh > /dev/null | |
# | |
# 2014-04-01 Brandon Calloway |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
###################################################### | |
# This script executes a full system backup. | |
# | |
# A cron job should run this weekly. | |
# 0 3 * * 0 sh /home/bcalloway/scripts/system_backup.sh > /dev/null | |
# | |
# 2014-04-01 Brandon Calloway | |
###################################################### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _getTLS(url, callback) { | |
var deprecated = false; | |
var message = []; | |
$.ajax({ | |
url: url, | |
}).done(function(data) { | |
if (parseFloat(data.tls_version.split(' ')[1]) < 1.2) { | |
deprecated = true; | |
message.push(app.resources.TLS_WARNING); |
OlderNewer