Skip to content

Instantly share code, notes, and snippets.

View MisterReally's full-sized avatar
🏠
Working from home

Ryan Riehle MisterReally

🏠
Working from home
View GitHub Profile
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.Framework.Client;
using Microsoft.TeamFoundation.Framework.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
# Compare-Directory.ps1
# Compare files in one or more directories and return file difference results
# Victor Vogelpoel <victor@victorvogelpoel.nl>
# Sept 2013
#
# Disclaimer
# This script is provided AS IS without warranty of any kind. I disclaim all implied warranties including, without limitation,
# any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or
# performance of the sample scripts and documentation remains with you. In no event shall I be liable for any damages whatsoever
# (including, without limitation, damages for loss of business profits, business interruption, loss of business information,
@RichardSlater
RichardSlater / JsonExtractionRule.cs
Created January 28, 2014 15:31
Visual Studio Test Tools JSON Extraction Rule using JSON.net
using System;
using System.ComponentModel;
using System.Globalization;
using Microsoft.VisualStudio.TestTools.WebTesting;
using Newtonsoft.Json.Linq;
namespace Amido.PerformanceTests.Common {
[DisplayName("JSON Extraction Rule")]
[Description("Extracts the specified JSON value from an object.")]
public class JsonExtractionRule : ExtractionRule {
@pratapvardhan
pratapvardhan / GFinSectorIndustryBasic.py
Created June 5, 2014 09:56
Python Script to extract Sector and Industry for a company stock listed on Google Finance
from urllib import urlopen
from lxml.html import parse
'''
Returns a tuple (Sector, Indistry)
Usage: GFinSectorIndustry('IBM')
'''
def GFinSectorIndustry(name):
tree = parse(urlopen('http://www.google.com/finance?&q='+name))
return tree.xpath("//a[@id='sector']")[0].text, tree.xpath("//a[@id='sector']")[0].getnext().text
@whitequark
whitequark / .xsession
Last active April 20, 2024 10:01
.xsession that starts up a minimal plasma-less KDE 5 environment with i3wm
#!/bin/sh
truncate -s0 ${HOME}/.xsession-errors
configDir=${HOME}/.config
mkdir -p $configDir
cat >$configDir/startupconfigkeys <<EOF
kcminputrc Mouse cursorTheme 'breeze_cursors'
kcminputrc Mouse cursorSize ''
@alirobe
alirobe / reclaimWindows10.ps1
Last active July 3, 2024 09:36
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@pylover
pylover / a2dp.py
Last active May 27, 2024 21:51
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3
"""Fixing bluetooth stereo headphone/headset problem in debian distros.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
Licence: Freeware
@AArnott
AArnott / AzureKeyVaultSample.cs
Last active May 23, 2023 15:37
A sample of how to obtain a secret value from Azure Key Vault using implicit auth via ADAL and your AD account
using System;
using System.Configuration;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.KeyVault; // Install-Package Microsoft.Azure.KeyVault
using Microsoft.IdentityModel.Clients.ActiveDirectory; // Install-Package Microsoft.IdentityModel.Clients.ActiveDirectory
namespace KeyVaultSample
{
class Program
enum UserRight {
SeAssignPrimaryTokenPrivilege # Replace a process level token
SeAuditPrivilege # Generate security audits
SeBackupPrivilege # Back up files and directories
SeBatchLogonRight # Log on as a batch job
SeChangeNotifyPrivilege # Bypass traverse checking
SeCreateGlobalPrivilege # Create global objects
SeCreatePagefilePrivilege # Create a pagefile
SeCreatePermanentPrivilege # Create permanent shared objects
SeCreateSymbolicLinkPrivilege # Create symbolic links
@valeryan
valeryan / README.md
Last active June 30, 2024 22:35
WSL Startup Script

USAGE

  1. Save the services.sh file to your computer in a location like C:/tools/wsl-startup/.
  2. Download the WSL Statup.xml and import it into Task Scheduler.
  3. Modify as needed for you personal use.