Skip to content

Instantly share code, notes, and snippets.

View vsshs's full-sized avatar

Vaidas Sirtautas vsshs

View GitHub Profile
@vsshs
vsshs / LogViewer pattern for parsing umbraco log files
Last active November 26, 2015 14:22
LogViewer pattern for parsing umbraco log files
%date{yyyy-MM-dd HH:mm:ss,fff} [%Generic] %level %class - %message
@vsshs
vsshs / newlinevalues.sql
Last active November 13, 2015 15:53
select values with newline symbols
DECLARE @NewLineChar AS CHAR(2) = CHAR(13) + CHAR(10)
SELECT *
FROM <tablename>
WHERE <fieldname> like '%'+@NewLineChar
@vsshs
vsshs / prepare-commit-msg
Last active December 11, 2015 12:07 — forked from manderly/prepare-commit-msg
Git hook: Automatically add branch name to the end of every commit message
# Automatically adds branch name to the end of every commit message. Handy for git/JIRA integrations.
# Make a copy of .git/hooks/prepare-commit-msg.sample in your repo and name the file prepare-commit-msg (remove "sample" extension)
# Paste the following into the file, save the file, and try it out in bash
NAME=$(git branch | grep '*' | sed 's/* //')
echo $(cat "$1") " in branch: $NAME" > "$1"
@vsshs
vsshs / log Parser Studio.sql
Last active December 18, 2015 14:27
log Parser Studio
SELECT
TO_TIMESTAMP(TO_DATE(date), TO_TIME(time)) AS Timestamp,
sc-status as Status, sc-substatus as Sub-Status, cs-method as Method,
cs-uri-stem as URL, cs-uri-query as Query, time-taken as Time-Taken-ms
FROM '[LOGFILEPATH]'
WHERE
time-taken > 1000
AND TO_DATE(date) = '2015-12-18'
@vsshs
vsshs / git_ignore_only_local
Last active January 12, 2016 13:01
git_ignore_only_local
git update-index --assume-unchanged Web/css/page.css
git update-index --assume-unchanged Web/js/*.js
** check with
git ls-files -v | grep ^[a-z]
@vsshs
vsshs / gist:1571891cd261082d474f
Created January 14, 2016 13:50
wlan password
netsh wlan show profile name="INSERT SSID HERE" key=clear
@vsshs
vsshs / iis.ps1
Last active April 20, 2016 12:05
Creates iis site and adds entry to hosts.
Import-Module WebAdministration
$iisAppPoolName = Read-Host 'What is IIS app pool name and App Name e.g. "local.mysite.com"?'
$iisAppPoolDotNetVersion = "v4.0"
$iisAppName = $iisAppPoolName
$directoryPath = Read-Host 'Where is the site located? e.g. D:\Git\mySite'
if (Get-Module -ListAvailable -Name PsHosts) {
Write-Host "PsHosts exists. Good. Adding entry to hosts..."
#create hosts entry
Add-HostEntry $iisAppPoolName 127.0.0.1
@vsshs
vsshs / .gitignore
Last active May 12, 2016 11:52
Git ignore for VS + Umbraco
## based on https://github.com/github/gitignore
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
@vsshs
vsshs / logviewerpattern
Last active May 20, 2016 10:07
Log viewer pattern for new umbraco logging scheme (copy it exactly since there is a space at the beginning)
%date{yyyy-MM-dd HH:mm:ss,fff} [%proc] %level %class - %message
@vsshs
vsshs / keybase.md
Created August 31, 2016 21:12
keybase.md

Keybase proof

I hereby claim:

  • I am vsshs on github.
  • I am vaidas (https://keybase.io/vaidas) on keybase.
  • I have a public key whose fingerprint is 875E A503 04A2 F2ED B50A FB0B 258D BC2A 3A54 CE30

To claim this, I am signing this object: