manningtree

BT Broadband Update

Category: TheShed
#Network #BT #Broadband #SysAdmin

Update: 29/10/2014

Same person from @BTCare. Sorry to hear still slower than before. I checked speed while on the call (~4.4mps down). She wanted to check something, called back 10mins later with:

Test show that there's a mismatch on the supplier side. I'll escalate, normally 48hrs turnaround …

Application Insights — Web Application Monitoring

Category: TheShed
#Visual Studio #Web #Application Insights #Azure #Programming

Visual Studio supports Application Insights. This provides an mechanism to add monitoring support into a web application. There's also a version for Azure.

Application Insights lets you monitor your live application for: * Availability - We'll test your URLs every few minutes from around the world. * Performance - Detect and diagnose perf issues …

Brackets Editor

Category: TheShed
#Text #Editor

In a HN thread on editors (Lighttable and that teams plans to do stuff with Eve) someone mentioned Brackets in the context of installed and haven't looked back since. Right now I'm happy with Sublime...

...but you never know.

Update: 2019-06-22 11:04:39

For quite a while now Visual …

WinDBG

Category: TheShed
#Windows #debugging #Programming

I saw a BSOD today, oh boy, first in a while.

  1. Grab WinDBG(x64) — install the Windows Software Development Kit (from here for 8.1) and select the debugging tools in the installer.
  2. Launch WinDbgx64
  3. Set the Symbol Search Path to SRV*C:\Windows\symbol_cache*http://msdl.microsoft.com/download …

Powershell JumpLocation

Category: TheShed
#PowerShell #Tools

A PowerShell script that remembers where you've been and makes it really easy to Jump there → https://github.com/tkellogg/Jump-Location

Git Cheats

Category: TheShed
#Git #Source Control #code

A post to capture Git related goodness. The secret sauce? Branch early and often but merge and kill branches too.

Updated: 2014-10-03

Fragments

Basics

Create a directory with your project

e.g. ~\project

git init

To create a Git repro. If you want a bare repro (i.e. because you're …

Executing a process on Windows

Category: TheShed
#Python #Programming

A fragment to execute a process on Windows:

from subprocess import Popen
proc = Popen("vi \"" + filename + "\"", shell=True )
print(proc)

Which opens filename with vi (whatever that might be on a Windows box). Note that while Python is pretty good from a crossplatform perspective, it's not the best when it …

Writing to a file in Python

Category: TheShed
#Python #filesystem #Programming

A fragment for writing to a file in Python:

f = open(filename,'w')
f.write('Hey, I'm saying Hello file! \n')
f.close()

Note that this will overwrite an existing file. Use open(filename,'a') to open in append mode. The Python documentation has details.

Python DateTime

Category: TheShed
#Python #Dates #Programming

A fragment for formatting dates and time in Python:

import datetime
date = datetime.datetime.now()
sDate = date.strftime("%Y%m%d")
sDateTime =  date.strftime("%Y%m%d %H:%M:%S")

See see https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior for formatting for details of string formatting for dates …

Python Command Line Arguments

Category: TheShed
#Python #fragments #Programming

A fragment for processing arguments passed from the command line:

import sys
# stuff
myArg = sys.argv[1]         # argv[0] is the name of the command

For more sophisticated parsing, StackOverflow has recommendations.