Skip to content

Instantly share code, notes, and snippets.

View normansolutions's full-sized avatar

Clive Norman normansolutions

View GitHub Profile
@normansolutions
normansolutions / FireflyMINTSurveyAnalysis.sql
Created June 4, 2015 10:35
Firefly MINT Survey Analysis
WITH mint_cte
(
id,
user_identity,
questiontext,
choicetext,
value,
minttype,
userguid
)
@normansolutions
normansolutions / UnifiAnalyseAPConnections.js
Last active August 29, 2015 14:18
Unifi Analyse AP Connections
/////////////////////////////////////
// Variables ////////////////////////
// AP to analyse
var apName = "Upper Floor";
// Timeframe to filter
var startTime = new Date("1 Feb 2015 16:35:33");
var endTime = new Date("1 April 2015 16:35:33");
@normansolutions
normansolutions / ColumnToRows.vba
Created March 3, 2015 09:52
Excel Macro To Create Rows From Column Data
Private Sub NewData_Click()
'Select sheet by name
Sheets("OriginalData").Select
'Get total rows in column 'a'
RowCount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
'Select range from K2 to O and clear contents
Range("K2:O" & RowCount).Select
Selection.ClearContents
'Variable to determin a new row
NewRow = 0
@normansolutions
normansolutions / CreateiSAMSPercentageDropDowns.ps1
Last active August 29, 2015 14:11
PowerShell to create iSAMS percentage drop-down lists for academic reports/work marks
$loop = '';
$print = '';
for ($loop = 0; $loop -le 100; $loop++)
{
$print += [string]$loop + '%@';
}
$print
@normansolutions
normansolutions / DisplayiSAMSSchoolIDAsColumns.sql
Created December 12, 2014 10:41
Display iSAMS txtSchoolID as columns
DECLARE @FormName VARCHAR( 100 );
SET @FormName = 'Your Form Name';
DECLARE @Xmldata XML = (SELECT txtschoolid
FROM tblpupilmanagementpupils
WHERE intsystemstatus = '1'
AND txtform = @FormName
FOR xml path( '' ));
// How many hours to summarize
var hours = 1400;
// User to summarize
var user = "Ipad";
var users = db.user.find({
"hostname": new RegExp(user)
});
for (var j = 0; j < users.length(); j++) {
var user = users[j];
@normansolutions
normansolutions / FFAnimationHTML.html
Created December 3, 2014 09:32
For use on blog post..
<style>
.STMmenuBar {
min-height: 64px;
display: inline-block;
}
.STMmenuBar img {
display: none;
padding: 3px;
border: 1px solid black;
@normansolutions
normansolutions / FFAnimationLoad.html
Created December 3, 2014 09:30
For use on blog post..
<!--Place the below code snippet just before the closing body tag
in the 'YourFFInstallation\Templates\YourTemplateFolder\defaul.xsl' file.-->
<!--Load Velocity.js - either from CDN (as below) or your preferred location (local etc).-->
<script src="//cdnjs.cloudflare.com/ajax/libs/velocity/1.1.0/velocity.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/velocity/1.1.0/velocity.ui.min.js"></script>
<script>
$(window).load(function () {
var images = $(".STMmenuBar a img ");
images.velocity("transition.flipYIn ", {
#################################################
$smtpServer="Your SMTP Server"
$from = "Your From Email Address"
$emailaddress = "Your Send To Email Addressk"
$subject = "The reportingServicesReportSelection.asp file has changed"
$body = "The reportingServicesReportSelection.asp file has changed, you need to re-add the script"
$strReference = "Your Path To An Original Copy Of The File"
$strDifference = "Your Path To a Deployed Copy Of The File"
#################################################
<!--Add this line to the form with id="form1" in the reportingServicesReportSelection.asp
located in "iSAMS\iSAMS.Framework\modules\StudentManagement\current" -->
<input type="hidden" name="userName" id="userName" value="" />