This file contains 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
select top 100 | |
d.name database_name | |
,t.name table_name | |
,sum(us.user_seeks) user_seeks | |
,sum(us.user_scans) user_scans | |
,sum(us.user_lookups) user_lookups | |
,sum(us.user_updates) user_updates | |
,max(us.last_user_seek) last_user_seek | |
,max(us.last_user_scan) last_user_scan | |
,max(us.last_user_lookup) last_user_lookup |
This file contains 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
select distinct local_net_address, local_tcp_port | |
from sys.dm_exec_connections | |
where local_net_address is not null |
This file contains 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
curl --silent https://omahaproxy.appspot.com/all.json | jq -r '.[] | select(.os == "linux").versions[] | select(.channel == "stable").current_version' | |
# Pipe to cut to get major version | |
# | cut -d '.' -f1 |
This file contains 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
@setlocal EnableDelayedExpansion | |
@set hosts=server01 server02 server03 | |
@for %%h in (%hosts%) do @( | |
@set host=%%h | |
@set host_no=!host:~-1! | |
@echo !host! | |
@echo %%h | |
@echo:!host_no! | |
) |
This file contains 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
const points = [ | |
// Bounds | |
[32.8644429,-117.2791394] | |
, [32.8693815,-117.0464238] | |
, [32.6162867,-116.9453358] | |
, [32.5781068,-117.1498078] | |
// Points inside | |
, [32.6, -117.1] | |
, [32.7, -117.2] | |
] |
This file contains 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
import https from 'node:https' | |
import { join } from 'node:path' | |
import { createWriteStream } from 'node:fs' | |
import { pipeline } from 'node:stream/promises' | |
import got from 'got' | |
/* Config */ | |
// Enable keep alive for better performance between calls. | |
https.globalAgent = new https.Agent({ keepAlive: true }) | |
const outDir = './out' |
This file contains 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
// This was stolen from somewhere on the net while I was working late to fulfill a deadline | |
// It is now here as a reminder | |
// sorry for the plagerism... | |
var HoverMarker = $window.L.Marker.extend({ | |
bindPopup: function(htmlContent, options) { | |
if (options && options.showOnMouseOver) { | |
L.Marker.prototype.bindPopup.apply(this, [htmlContent, options]); | |
//this.off("click", this.openPopup, this); | |
this.on("mouseover", function(e) { |
This file contains 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
@echo off | |
REM %1 = action | |
REM %2 = service | |
REM Set vars | |
set status="" | |
set message="" | |
set hint="C:\>servicecontrol.bat [ START | STOP ] [<service_name>]" | |
set example=servicecontrol.bat start "My Service Name" |
This file contains 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
angular.module('BugLogHq', []) | |
.constant('appName', "app") | |
.constant('bugLogConfig', { | |
listener: "", | |
hostName: "", | |
apiKey: "" | |
}) | |
.config(['$provide', | |
function ($provide) { | |
$provide.decorator('$exceptionHandler', ['$delegate', '$log', 'BugLogService', |
This file contains 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
var app = angular.module('loupe', []); | |
app.controller('MainCtrl', ['$scope', | |
function($scope) { | |
$scope.title = 'AngularJS Image Loupe'; | |
$scope.image = 'puppy.jpg'; | |
$scope.loupeOptions = { | |
width: 360, | |
height: 144, | |
round: false, |
NewerOlder