Skip to content

Instantly share code, notes, and snippets.

View 1912UWPBLE_3.cs
public class AdvertisementListItem
public ulong BluetoothAddress;
public string AdvertisementData;
public AdvertisementListItem(BluetoothLEAdvertisementReceivedEventArgs eventArgs)
BluetoothAddress = eventArgs.BluetoothAddress;
var dataSections = eventArgs.Advertisement.DataSections;
foreach (BluetoothLEAdvertisementDataSection dataSection in dataSections)
View Working With Strings: drills
willin / proxy.d.ts
Last active Dec 12, 2019
View proxy.d.ts
interface ProxeeHandler<T extends object, TOut extends object> {
get?<K extends keyof TOut>(target: T, p: K, receiver: TOut): TOut[K];
set?<K extends keyof TOut>(target: T, p: K, value: TOut[K], receiver: TOut): boolean;
interface ProxeeConstructor {
new <T extends object, TOut extends object>(target: T, handler: ProxeeHandler<T, TOut>): TOut;
View untrusted-lvl6-solution.js
* drones101.js *
* Do you remember, my dear Professor, a certain introductory
* computational rationality class you taught long ago? Assignment
* #2, behavior functions of autonomous agents? I remember that one
* fondly - but attack drones are so much easier to reason about
* when they're not staring you in the face, I would imagine!
View untrusted-lvl8-solution.js
* intoTheWoods.js *
* Ah, you're out of the woods now. Or into the woods, as the
* case may be.
* So take a deep breath, relax, and remember what you're here
* for in the first place.
View 1912UWPBLE_2.cs
private async void OnAdvertisementReceived(BluetoothLEAdvertisementWatcher watcher,
BluetoothLEAdvertisementReceivedEventArgs eventArgs)
await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
AdvertisementListItem item = new AdvertisementListItem(eventArgs);
if (AdvertisementList.Select(x => x.BluetoothAddress).Where(x => x.Equals(item.BluetoothAddress)).Count() == 0)
aruruka /
Created Dec 12, 2019
Troubleshooting bash code snippet for Kubernetes cluster administration.



尝试从 apiServer 参数--advertise-address和 kubelet 参数--node-ip入手。


比如在物理机上通过 vagrant 创建虚拟机部署 k8s 集群,虚拟机默认可能会配置一张 NAT 网卡作为默认网卡且这个 ip 可能是一样的,那可能多个虚拟机的的默认网卡的 ip 都是一样的。

kube-dns 相关

kube-dns 的 service ip 更改导致集群内服务发现功能不可用

HugsLibRecordKeeper / output_log.txt
Created Dec 12, 2019
Rimworld output log published using HugsLib
View output_log.txt
Log uploaded on Thursday, December 12, 2019, 10:24:45 AM
Loaded mods:
Core: (no assemblies)
Mod Manager: 0ColourPicker(, 0Harmony(, FluffyUI(, ModManager(av:,fv:1.31.872), YamlDotNet(av:,fv:
Startup impact: 0Harmony(, StartupImpact(1.1.7027.12912)
Startup_impact_zh: (no assemblies)
RIMMSLoadUp: 0Harmony(, RIMMSLoadUp(1.0.7040.29929)
RuntimeGC: RuntimeGC(
Lolidrop's hairshop: (no assemblies)
Work Tab: 0Harmony(, FluffyUI(, WorkTab(av:,fv:3.9.285)
View workInfo.swift
class WorkInfo: Object{
@objc dynamic var title: String?
@objc dynamic var content: String?
let seq = RealmOptional<Int>()
// ...
View gist:bc7af6d7ff0ee2e3f61529b239b7ec32
class DepthPageTransformer: ViewPager.PageTransformer {
companion object {
private const val MIN_SCALE = 0.75f
override fun transformPage(view: View, position: Float) {
when {
position < -1 -> // [-Infinity,-1)
// This page is way off-screen to the left.
view.alpha = 0f
You can’t perform that action at this time.