Skip to content

Instantly share code, notes, and snippets.

View jeremypage's full-sized avatar

Jeremy Page jeremypage

  • Trafford Council
  • UK
View GitHub Profile
@jeremypage
jeremypage / userDefineLang.xml
Created July 23, 2015 15:22
Notepad++: userDefineLang.xml for Markdown (from https://github.com/jjchiw/markdown_npp)
<NotepadPlus>
<UserLang name="MarkDown" ext="md markdown" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="yes" Keywords2="yes" Keywords3="yes" Keywords4="yes" Keywords5="yes" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00# 01 02 03&lt;!-- 04--&gt;</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@jeremypage
jeremypage / IsMemberOf.vb
Last active August 29, 2015 14:25
LDAP: Check if logged in user is member of domain group(s). Uses alternative credentials to log on to domain controller.
Function IsMemberOf()
' Checks if logged in user is member of LDAP groups (group1, group2)
IsMemberOf = False
Const ADS_SECURE_AUTHENTICATION = 1
Const ADS_SERVER_BIND = &h0200
strUser = "***domain user name***"
@jeremypage
jeremypage / git-cheatsheet.md
Last active May 5, 2025 06:31
Git cheatsheet

Git cheatsheet

Find all instances of text in all commits

git grep "text to look for" $(git rev-list --all)

List commit messages since given commit

@jeremypage
jeremypage / web.config
Created April 10, 2015 10:59
IIS: Enable json/geojson MIME types
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".json" mimeType="application/json" />
<mimeMap fileExtension=".geojson" mimeType="application/json" />
</staticContent>
<handlers>
<add name="geoJSON" path=".geojson" verb="*" modules="IsapiModule" scriptProcessor="C:\WINDOWS\system32\inetsrv\asp.dll" resourceType="Unspecified" />
<add name="JSON" path=".json" verb="*" modules="IsapiModule" scriptProcessor="C:\WINDOWS\system32\inetsrv\asp.dll" resourceType="Unspecified" />
for /F %x in (websites.txt) do nslookup -q=ns %x
@jeremypage
jeremypage / recursive-file-change-list.cmd
Created April 9, 2015 09:07
Powershell: Recursively list all files in folder with last change date (from http://stackoverflow.com/a/13345137)
get-childitem E:\search-folder -rec | where {!$_.PSIsContainer} | select-object FullName, LastWriteTime, Length | export-csv -notypeinformation -delimiter '|' -path file.csv
@jeremypage
jeremypage / powershell-cheatsheet.md
Last active April 17, 2025 08:14
Powershell cheatsheet

Powershell Cheatsheet

Get all AD properties of user:

Get-ADUser %username% -properties *
@jeremypage
jeremypage / github-style-ordered-list.css
Last active August 29, 2015 14:18
CSS: More attractive ordered list style, as used in GitHub Help pages. Displays big bold numbers and a right border.
ol {
counter-reset: li;
list-style: none;
margin: 0;
padding: 0
}
ol>li {
position: relative;
margin-bottom: 1em
temp1 := ZnEasy get: 'address in here'.
trello := NeoJSONReader fromString: temp1 entity.
trelloLists := trello at:'lists'.
trelloCards := trello at:'cards'.
trelloLists do: [ :each|| listId |
listId := each at:'id'.
each at:'cards' put: ((trelloCards select:[:item|(( item at:'idList')=listId)])collect:[:item| item at:'name']).
].
@jeremypage
jeremypage / system-down.html
Last active August 29, 2015 14:16
System down holding page for Trafford Council
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html lang="en-gb" class="no-js">
<!--<![endif]-->
<head>
<meta charset="utf-8">