Skip to content

Instantly share code, notes, and snippets.

Kamran Ayub kamranayub

Block or report user

Report or block kamranayub

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@johnmcase
johnmcase / updateNpm.bat
Last active May 6, 2019
Update npm on windows
View updateNpm.bat
rem see https://github.com/coreybutler/nvm-windows/issues/300
@echo off
SETLOCAL EnableDelayedExpansion
if [%1] == [] (
echo Pass in the version you would like to install, or "latest" to install the latest npm version.
) else (
set wanted_version=%1
@easyveazie
easyveazie / Join Skype Meeting Command Line
Last active Jul 9, 2019
Join Skype Meeting Command Line
View 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("^(+~)")
@szalapski
szalapski / TfsWebCompact.bookmarklet.js
Last active May 6, 2016
TfsWebCompact neatens up the look-and-feel of your TFS web backlog and task board. See also http://www.szalapski.com/2014/05/a-compact-layout-for-tfs-web-work-items.html .
View TfsWebCompact.bookmarklet.js
/* The following is a bookmarklet. For it to work, you need to convert all whitespace to "%20",
then invoke it from a bookmark in your browser.
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: /*TfsWebCompact bookmarklet 2.3 by Szalapski.com. For TFS 2015 task board, story board, and backlog.*/
(function TfsWebCompact(){
function addStyle(selector, styles){ addCss(selector + '{' + styles + '}'); }
function addCss(css){ jQuery('html > head').append(jQuery('<style>' + css + '</style>')); }
(function tightenUpBoard(){
jQuery('.taskboard').css('left','0');
@anaisbetts
anaisbetts / .gitattributes
Created Dec 3, 2014
USE THIS GITATTRIBUTES FOR EVERY NEW PROJECT FOREVER AND EVER
View .gitattributes
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
@joa
joa / code.js
Created Jun 6, 2013
Gmail Life Saver
View code.js
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));
}
}
@riywo
riywo / gist:5000181
Created Feb 20, 2013
How to delete git remote(origin) branch or tag?
View gist:5000181
# 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
View LoginView.xaml
<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">
@kevinSuttle
kevinSuttle / meta-tags.md
Last active Aug 22, 2019 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
View meta-tags.md

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset="UTF-8">
<meta name="keywords" content="your, tags">
<meta name="description" content="150 words">
<meta name="subject" content="your website"s subject">
<meta name="copyright" content="company name">
@kamranayub
kamranayub / Transforms.xml
Created Feb 26, 2012
MSBuild Inline Task to Transform a Hierarchy of XML Files using XDT Transforms
View Transforms.xml
<!-- 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
@kamranayub
kamranayub / PrettyJson.cs
Last active Sep 25, 2015
Formats a valid JSON string into a pretty output
View PrettyJson.cs
/// <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
You can’t perform that action at this time.