Skip to content

Instantly share code, notes, and snippets.

View pjsvis's full-sized avatar

Peter John Smith pjsvis

  • Virtual Information Systems
  • Edinburgh
View GitHub Profile
@pjsvis
pjsvis / gist:6210002
Last active November 13, 2020 00:56
Angular directive for jQuery sparkline
// Requires jQuery from http://jquery.com/
// and jQuerySparklines from http://omnipotent.net/jquery.sparkline
// AngularJS directives for jquery sparkline
angular.module('sparkline', []);
angular.module('sparkline')
.directive('jqSparkline', [function () {
'use strict';
return {
IEnumerable<IEnumerable<int>> GenerateCage(int num, int target, params int[] excluded)
{
return GenerateCageInner(num, target, 1, 9, new HashSet<int>(excluded));
}
private IEnumerable<IEnumerable<int>> GenerateCageInner(int num, int target, int min, int max, HashSet<int> excluded)
{
// Base case
if (num == 0)
{
@pjsvis
pjsvis / cloudSettings
Last active April 29, 2017 11:44
Visual Studio code settings
{"lastUpload":"2017-04-26T10:10:35.981Z","extensionVersion":"v2.6.2"}
@pjsvis
pjsvis / boxstarter
Last active November 27, 2016 11:37
#RUN the following to kick off script-> START http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/caschw/7216643660f349b6e9e2/raw/763cb0a42ab7e21eee9c22a96b94df5c0e1bcaa5/boxstarter
#So Meta!
choco install chocolatey
choco install boxstarter
#run the rest in the boxstarter shell
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-RemoteDesktop
{
"rules": {
"class-name": true,
"comment-format": [
true,
"check-space"
],
"indent": [
true,
"spaces"
{
"name": "app",
"version": "0.0.0",
"description": "No description yet",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"tsc-watch": "tsc --watch"
},
"author": {
/*
Adapted from the utp gulp file
Currently using _LayoutEx.cshtml as master pages
Need to include bootstrap
*/
// Visual Studio has a binding of BeforeBuild: main
// This means that when you build the app the main task will run.
//
// References
// 1. [https://gist.github.com/spboyer/96339ce687b0c79b8258](https://gist.github.com/spboyer/96339ce687b0c79b8258)
{
"name": "app",
"version": "0.0.0",
"dependencies": {
"modernizr": "^3.3.1",
"jquery": "^3.1",
"signalr": "^2.2.0",
"lodash": "4.3.0",
"angular": "^1.5.0",
"angular-route": "^1.5.0",
{
"rules": {
"selector-no-id": true
}
}
{
"rules": {
"selector-no-id": true
}
}