Skip to content

Instantly share code, notes, and snippets.

@arijusg
arijusg / PerformanceON.bat
Created June 28, 2017 21:41 — forked from williamfields/PerformanceON.bat
Pre-Performance Script
echo "TURN OFF WINDOWS DEFENDER FROM CONTROL PANEL, THEN HIT SPACE."
pause
echo "TURN ON AIRPLANE MODE, THEN HIT SPACE."
pause
echo "TURN OFF NIGHT LIGHT FOR VIDEO WORK, THEN HIT SPACE."
@arijusg
arijusg / README.MD
Last active June 2, 2017 12:49
Run Windows gitk via bash

Windows 10 bash gitk routing

mkdir ~/bin && \
touch ~/bin/gitk && \
chmod +x ~/bin/gitk && \
echo '#!/bin/bash' > ~/bin/gitk && \
echo "/mnt/c/'Program Files'/Git/cmd/gitk.exe" >> ~/bin/gitk && \
echo 'export PATH=$PATH":$HOME/bin"' >> ~/.bashrc && . ~/.bashrc
@arijusg
arijusg / ..README.md
Last active June 2, 2017 10:17
Beyond Compare 4 as difftool on Windows 10 bash

git difftool Beyond Compare on Windows from bash

@arijusg
arijusg / gist:6197e3df0e0f1b349c3bab2be7f43e04
Last active June 1, 2017 21:07
Windows 10 bash colours
cd ~
nano ~/.bashrc
paste this at bottom of file
```
LS_COLORS=$LS_COLORS:'rs=0:di=1;35:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=0
@arijusg
arijusg / package.json
Created June 1, 2017 07:48
Pre commit hook - the right way
{
"name": "app",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"build-prod": "rm -rf dist && ng build --prod --output-hashing none --vendor-chunk true --extract-css false",
"test": "ng test --single-run",
@arijusg
arijusg / gist:32880f176b4985adc94a
Created March 23, 2016 16:19
ChangeAndNotify WPF extention
public static class ChangeAndNotifyExtention
{
public static bool ChangeAndNotify<T>(this PropertyChangedEventHandler handler,
ref T field, T value, Expression<Func<T>> memberExpression)
{
if (memberExpression == null)
{
throw new ArgumentNullException("memberExpression");
}
var body = memberExpression.Body as MemberExpression;
USE [master]
GO
/****** Object: StoredProcedure [dbo].[sp_who3] Script Date: 23/03/2016 12:09:03 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[sp_who3]
(
@filter tinyint = 1,
@arijusg
arijusg / SqlIndexesMaintenance.sql
Created March 23, 2016 11:45
SqlI Indexes Maintenance
-- Ensure a USE <databasename> statement has been executed first.
USE <databasename>
SET NOCOUNT ON
-- adapted from "Rebuild or reorganize indexes (with configuration)" from MSDN Books Online
-- (http://msdn.microsoft.com/en-us/library/ms188917.aspx)
-- =======================================================
@arijusg
arijusg / SP_WHO2
Created May 21, 2015 07:47
Running SQL Queries
CREATE TABLE #sp_who2 (SPID INT,Status VARCHAR(255),
Login VARCHAR(255),HostName VARCHAR(255),
BlkBy VARCHAR(255),DBName VARCHAR(255),
Command VARCHAR(255),CPUTime INT,
DiskIO INT,LastBatch VARCHAR(255),
ProgramName VARCHAR(255),SPID2 INT,
REQUESTID INT)
INSERT INTO #sp_who2 EXEC sp_who2
SELECT *
FROM #sp_who2
<asp:TemplateField HeaderText="More =>">
<ItemTemplate>
<asp:ImageButton ID="imgBtnExpand" runat="server" CommandName="Expand"
CommandArgument='<%# ((GridViewRow) Container).RowIndex %>' ImageUrl="~/images/expand_button.png" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
</td></tr>