Skip to content

Instantly share code, notes, and snippets.

@seif
seif / timeout.cs
Last active January 9, 2017 07:59
Mono WebRequest timeouts after ThreadPool exhaustion
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using System.Timers;
public class Test
{

Keybase proof

I hereby claim:

  • I am seif on github.
  • I am seif (https://keybase.io/seif) on keybase.
  • I have a public key ASBlz_zuh7mP-8xWoNa3P3UXvicDzntKYT_Pk5zicRDr8Ao

To claim this, I am signing this object:

Use of Mutation Events is deprecated. Use MutationObserver instead. contentscript.js:121:10
ember-i18n has been deprecated in favor of ember-intl ember-i18n.js:10
Asset version: 8c6208093ab2872cde9079f2712a3bc0be3cda53 controller.js:147
TypeError: "e.get is not a function"
state experiments.js:21
Ember 3
experiments experiments.js:25
Ember 3
variations experiments.js:37
Ember 2
@seif
seif / VBox.log
Created October 31, 2019 12:16
virtualbox ubuntu failure
00:00:00.778907 VirtualBox VM 6.0.14_Ubuntu r132055 linux.amd64 (Oct 17 2019 07:24:16) release log
00:00:00.778909 Log opened 2019-10-31T12:12:51.499472000Z
00:00:00.778910 Build Type: release
00:00:00.778913 OS Product: Linux
00:00:00.778914 OS Release: 5.3.0-19-generic
00:00:00.778915 OS Version: #20-Ubuntu SMP Fri Oct 18 09:04:39 UTC 2019
00:00:00.778934 DMI Product Name: 20FXS1HV01
00:00:00.778940 DMI Product Version: ThinkPad T460p
00:00:00.778973 Host RAM: 31545MB (30.8GB) total, 14928MB (14.5GB) available
00:00:00.778976 Executable: /usr/lib/virtualbox/VirtualBoxVM
@seif
seif / Machine.cs
Last active February 24, 2021 15:15
Get real number of cpus on machine, ignoring any quotas/limits.
namespace Utilities
{
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
public static class Machine
{
private const int MaximumNumberOfCpus = 128;
private static int? _processorCount;