Skip to content

Instantly share code, notes, and snippets.

View shikhar's full-sized avatar
🐒

Shikhar Bhushan shikhar

🐒
View GitHub Profile
@shikhar
shikhar / gist:5f94ca4955fb893814fdeccee7e37151
Created November 6, 2022 00:30
twitter auth error page stacktrace
Error: Failed to find request token in session
at SessionStore.get (/rbd/pnpm-volume/463b6737-3f01-4ee0-b330-e2d2c368212e/node_modules/passport-twitter/node_modules/passport-oauth1/lib/requesttoken/session.js:13:44)
at Strategy.OAuthStrategy.authenticate (/rbd/pnpm-volume/463b6737-3f01-4ee0-b330-e2d2c368212e/node_modules/passport-twitter/node_modules/passport-oauth1/lib/strategy.js:214:33)
at Strategy.authenticate (/rbd/pnpm-volume/463b6737-3f01-4ee0-b330-e2d2c368212e/node_modules/passport-twitter/lib/strategy.js:87:40)
at attempt (/rbd/pnpm-volume/463b6737-3f01-4ee0-b330-e2d2c368212e/node_modules/passport/lib/middleware/authenticate.js:369:16)
at authenticate (/rbd/pnpm-volume/463b6737-3f01-4ee0-b330-e2d2c368212e/node_modules/passport/lib/middleware/authenticate.js:370:7)
at Layer.handle [as handle_request] (/rbd/pnpm-volume/463b6737-3f01-4ee0-b330-e2d2c368212e/node_modules/express/lib/router/layer.js:95:5)
at next (/rbd/pnpm-volume/463b6737-3f01-4ee0-b330-e2d2c368212e/node_module
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Gnuplot not found, using plotters backend
Benchmarking ser/sr.json
Benchmarking ser/sr.json: Warming up for 3.0000 s
Benchmarking ser/sr.json: Collecting 100 samples in estimated 5.0007 s (26M iterations)
Benchmarking ser/sr.json: Analyzing
public class RateLimiter {
private final double permitsPerSecond;
private long nextAvailabilityNanos;
public RateLimiter(final double permitsPerSecond) {
this.permitsPerSecond = permitsPerSecond;
}

Keybase proof

I hereby claim:

  • I am shikhar on github.
  • I am shikhrr (https://keybase.io/shikhrr) on keybase.
  • I have a public key whose fingerprint is 3CD0 5142 94CD 4537 103D 463E 8157 6E19 CAEB 9212

To claim this, I am signing this object:

import org.apache.flink.streaming.api.functions.AssignerWithPeriodicWatermarks
import org.apache.flink.streaming.api.watermark.Watermark
import scala.concurrent.duration.FiniteDuration
/**
* Implements a TimestampExtractor that treats a static delta from the last timestamp as the current watermark.
*
* @param baseExtractor
* @param toleranceThreshold
import org.apache.flink.api.common.state.ValueState;
import org.apache.flink.api.common.state.ValueStateDescriptor;
import org.apache.flink.api.common.typeutils.base.LongSerializer;
import org.apache.flink.streaming.api.windowing.triggers.Trigger;
import org.apache.flink.streaming.api.windowing.triggers.TriggerResult;
import org.apache.flink.streaming.api.windowing.windows.Window;
import java.io.IOException;
/**
import java.time.Clock;
import java.util.concurrent.atomic.AtomicLong;
public class ClockedMonotonicCounter {
// sign_bit_unused | 42_bits_epochTimeMs | 21_bit_counter
private static final int TIME_SHIFT = 21;
private static final int COUNTER_MASK = (1 << TIME_SHIFT) - 1;
import java.io.IOException;
import java.util.SortedSet;
import java.util.concurrent.ConcurrentSkipListSet;
import java.util.concurrent.atomic.AtomicLong;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
public class CheckpointTracker {
2015-05-19 12:47:30
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode):
"Attach Listener" #112 daemon prio=9 os_prio=0 tid=0x00007f3414001000 nid=0x3392 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"elasticsearch[search44-es1][generic][T#9]" #111 daemon prio=5 os_prio=0 tid=0x00007f3374088800 nid=0x325f waiting on condition [0x00007f33630ef000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x000000052c37e4b0> (a java.util.concurrent.SynchronousQueue$TransferStack)
2014-11-05 18:37:58
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.5-b02 mixed mode):
"Attach Listener" #168 daemon prio=9 os_prio=0 tid=0x00007f7a5c004000 nid=0x4029 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"ForkJoinPool-3-worker-29" #167 daemon prio=5 os_prio=0 tid=0x00007f7950002800 nid=0x3fac waiting on condition [0x00007f79db21f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000005e4dda6b0> (a scala.concurrent.forkjoin.ForkJoinPool)