Skip to content

Instantly share code, notes, and snippets.

View rdev5's full-sized avatar
💭
Note: This account has been moved to @mattborja

Matt Borja rdev5

💭
Note: This account has been moved to @mattborja
View GitHub Profile
@fitnr
fitnr / table2csv.js
Created January 30, 2015 17:47
convert table to csv (uses JQuery)
// encoded:
// javascript:(function()%7B$('table').each(function()%7Bvar%20$table=$(this);$('%3Ctextarea%3E').css('width',$table.width()).css('height','400px').html($.map($table.find('tr'),function(tr)%7Breturn%20$.map($(tr).find('th,%20td'),function(e)%7Breturn'%22'+$(e).text().replace('%22','%22%22').replace('%5Cn','%20')+'%22'%7D).join(',')%7D).join('&%2313;&%2310;')).insertAfter($table);%7D)%7D)()
javascript:(function() {
$('table').each(function() {
var $table = $(this);
$('<textarea>').css('width', $table.width())
.css('height', '400px')
.html(
$.map(
$table.find('tr'), function(tr) {
@rdev5
rdev5 / CryptDemo.java
Last active December 28, 2015 22:19
Patch for EncryptedMapDecorator.java (cas-server-extension-clearpass). Returns IV (16 bytes) prepended to ciphertext on encrypt(); mandatory for proper decryption. Useful in clustered environments where IVs saved to thread-safe ConcurrentHashMaps are being stored locally in memory, thus rendering other systems in the cluster unable to decrypt a …
/*
* Licensed to Yavapai College under one or more contributor license
* agreements. See the NOTICE file distributed with this work
* for additional information regarding copyright ownership.
* Jasig licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a
* copy of the License at the following location:
*
* http://www.apache.org/licenses/LICENSE-2.0