Skip to content

Instantly share code, notes, and snippets.

View kamranayub's full-sized avatar

Kamran Ayub kamranayub

View GitHub Profile
<!DOCTYPE html>
<!-- Helpful things to keep in your <head/>
// Brian Blakely, 360i
// http://twitter.com/brianblakely/
-->
<head>
<!-- Disable automatic DNS prefetching.
@kamranayub
kamranayub / PrettyJson.cs
Last active September 25, 2015 02:17
Formats a valid JSON string into a pretty output
/// <summary>
/// Formats a JSON string by walking through it and examining the contents.
/// </summary>
/// <param name="json">Unformatted JSON string, expects valid JSON with quoted keys and no whitespace.</param>
/// <returns>Formatted JSON string</returns>
/// <remarks>
/// [ { should have line breaks and tabs after them
/// ] } should have line breaks and tabs before them
/// : should have a space after it
/// , should have a line break and tab
@kamranayub
kamranayub / Transforms.xml
Created February 26, 2012 18:02
MSBuild Inline Task to Transform a Hierarchy of XML Files using XDT Transforms
<!-- This task takes in a XDT transform file and transforms it, following any inheritance chain.
There should be at least one base transform for this to work; otherwise just use Microsoft's
regular TransformXml task. -->
<!-- EXAMPLE USAGE:
<TransformXmlHierarchy
Source="source.xml"
Destination="transformed.xml"
TaskDirectory="path/to/directory/of/Microsoft.Web.Publishing.Tasks" />
-->
<UsingTask
@kevinSuttle
kevinSuttle / meta-tags.md
Last active March 22, 2024 09:36 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
<UserControl x:Class="SCO.Ria.UI.Views.LoginView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
xmlns:interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:local="clr-namespace:Caliburn.Micro.Focus;assembly=Caliburn.Micro.Focus"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" mc:Ignorable="d"
d:DesignHeight="154" d:DesignWidth="468">
@riywo
riywo / gist:5000181
Created February 20, 2013 22:15
How to delete git remote(origin) branch or tag?
# branch
$ git branch -d BRANCH # delete local BRANCH
$ git push origin :BRANCH # delete remote BRANCH
# tag
$ git tag -d TAG # delete local TAG
$ git push origin :refs/tags/TAG # delete remote TAG
@joa
joa / code.js
Created June 6, 2013 12:17
Gmail Life Saver
function archiveInbox() {
var query = 'label:inbox is:read older_than:28d -label:unanswered -label:unread';
var batchSize = 100;
while(GmailApp.search(query, 0, 1).length == 1) {
GmailApp.moveThreadsToArchive(GmailApp.search(query, 0, batchSize));
}
}
@anaisbetts
anaisbetts / .gitattributes
Created December 3, 2014 16:26
USE THIS GITATTRIBUTES FOR EVERY NEW PROJECT FOREVER AND EVER
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
@szalapski
szalapski / TfsWebCompact.bookmarklet.js
Last active January 26, 2024 15:06
TfsWebCompact neatens up the look-and-feel of your Azure DevOps web backlog and task board. See also http://www.szalapski.com/2014/05/a-compact-layout-for-tfs-web-work-items.html .
/* The following is a bookmarklet.
To actually use it, it is easier to drag-and-drop starting with my blog post:
http://www.szalapski.com/2014/05/a-compact-layout-for-tfs-web-work-items.html */
javascript:/* version 2024-01-26 */(function () { var s = document.createElement('style'); s.innerText = `
/* for backlog list */
#header-row {display: none;}
.header-section .hubs-section {left:300px; top:-5px;}
.nav-separated .hub-groups-section, .nav-separated .search-box {margin-top:0; padding-top:0;}
@easyveazie
easyveazie / Join Skype Meeting Command Line
Last active April 9, 2021 10:05
Join Skype Meeting Command Line
We have a "virtual room" at the office that we use to expand our office with our remote teammates.
It's essentially laptop hooked up to a fancy camera that hosts a Skype meeting.
In order to simulate a user logging into Skype and joining the meeting, we run a PowerShell script that opens the conference room,
and simulate CTRL + SHIFT + ENTER to join with video.
$x = New-Object -COM WScript.Shell
$x.Run('"C:\Program Files (x86)\Microsoft Office\root\Office16\lync.exe" conf:sip:https://join.mydomain.com/meet/myusername/Y5356B19')
sleep -seconds 10
$x.SendKeys("^(+~)")