Skip to content

Instantly share code, notes, and snippets.

View Rush's full-sized avatar
☺️
Work hard, play hard

Damian Kaczmarek Rush

☺️
Work hard, play hard
View GitHub Profile
@Rush
Rush / StripArgsTest
Created May 19, 2014 22:57
C# arguments handling test
using System.Diagnostics;
using System;
class Program
{
public static bool IsRunningOnMono()
{
return Type.GetType ("Mono.Runtime") != null;
}
@Rush
Rush / thread_read_test.cpp
Last active August 29, 2015 14:01
C++ threaded read test
#include <thread>
#include <fstream>
#include <vector>
#include <chrono>
#include <sys/stat.h>
#include <iostream>
#include <atomic>
long file_size(const char* file)
{
@Rush
Rush / node-https-bug.js
Last active August 29, 2015 14:02
HTTPS connection closed in the middle of request on 0.11.11 and later nodejs/node-v0.x-archive#7733
/*
Issue joyent/node#7733
run this on a remote server and do on your local machine (I have 40ms lag to my server)
you need this image file:
http://x.rushbase.net/da39a3ee5e6b4b0d3255bfef95601890afd80709/codecharm-white.png
wget --no-check-certificate https://yourserver.net:63000/codecharm-white.png
this should yield error on node 0.11.11 and upper and works well o node 0.11.10:

Keybase proof

I hereby claim:

  • I am rush on github.
  • I am rushpl (https://keybase.io/rushpl) on keybase.
  • I have a public key ASBSqVg6ydnTE-NIgaCHSJNYvcEJWypd4WLHN-EunskoTQo

To claim this, I am signing this object:

@Rush
Rush / memoize-decorator.ts
Last active January 27, 2022 10:18
Using memoizee with observables
import { decorate } from 'core-decorators';
import * as memoize from 'memoizee';
import { duration, unitOfTime } from 'moment';
import { memoizeObservable } from './rxjs';
type HumanDuration = [number, unitOfTime.DurationConstructor];
export interface MemoizeOptions extends memoize.Options {
observable?: boolean;
ttl?: HumanDuration;
{
"error": "Invalid version"
}