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:
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 } | |
} |
#!/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 | |
{ |
using System; | |
using System.IO; | |
using Google.Protobuf; | |
namespace ProtoCore | |
{ | |
public static class StreamExtensions | |
{ | |
public static void Write(this Stream stream, IMessage message) | |
{ |
//: Playground - noun: a place where people can play | |
import Cocoa | |
extension String { | |
// | |
func splitBetween(_ startText:String, and endText:String) -> [String]? { | |
guard let startIndex = self.range(of: startText)?.upperBound else { | |
return nil |
Szechuan Sauce | |
1/2 cup water | |
1/2 cup white vinegar | |
1/2 cup sugar | |
1/2 cup soy sauce | |
1 tbs apple cider vinegar | |
1/2 tsp sesame seed oil | |
1/4 tsp garlic powder | |
1/4 tsp onion powder |