I hereby claim:
- I am xinmyname on github.
- I am xinmyname (https://keybase.io/xinmyname) on keybase.
- I have a public key ASAoRTJxA5nTit-WADlMp2pUsUXFriwojaWW4YyvcuDBRwo
To claim this, I am signing this object:
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Linq; | |
using System.Reflection; | |
using Microsoft.SharePoint; | |
namespace MileageSite.Layouts.MileageSite | |
{ | |
public static class SPListItemExtensions |
using System; | |
using System.IO; | |
using Google.Protobuf; | |
namespace ProtoCore | |
{ | |
public static class StreamExtensions | |
{ | |
public static void Write(this Stream stream, IMessage message) | |
{ |
int MidRoundUp(int x, int y) { | |
return (x | y) - ((x ^ y) >> 1); | |
} | |
int MidRoundDown(int x, int y) { | |
return ((x ^ y) >> 1) + (x & y); | |
} | |
/* Source: https://lemire.me/blog/2022/12/06/fast-midpoint-between-two-integers-without-overflow/ */ |
function Coalesce-Args { | |
$result = $null | |
foreach($arg in $args) { | |
if ($arg -is [ScriptBlock]) { | |
$result = & $arg | |
} else { | |
$result = $arg | |
} | |
if ($result) { break } | |
} |
# Magic fairy dust for working with WSPs and SharePoint 2010 in PowerShell | |
# So far, I've only tested this with event receivers, but I'll expand it | |
# as necessary. | |
function Get-WSPFeatures { | |
param($wspFilename = $(throw "Please specify a WSP file.")) | |
$wspPath = (gci $wspFilename).FullName | |
$wsp = _wspExtractWSP $wspPath |
#!/bin/sh | |
launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist | |
launchctl unload -w /Library/LaunchAgents/com.adobe.ccxprocess.plist |
public enum Kind:Int,CustomStringConvertible { | |
case weapon | |
case armor | |
case scroll | |
case wand | |
case potion | |
case ring | |
public var description:String { |
I hereby claim:
To claim this, I am signing this object:
# Launches code correctly, without cmd.exe so it works with UNC paths | |
function LaunchCode { | |
PowerShell -Command "& 'C:\Users\sherwooda\AppData\Local\Programs\Microsoft VS Code\Code.exe' $args" | |
} | |
New-Alias e LaunchCode |
using System; | |
using System.Linq; | |
using System.Messaging; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace MessageCore | |
{ | |
public static class MessageQueueFactory | |
{ |