I hereby claim:
- I am winguse on github.
- I am winguse (https://keybase.io/winguse) on keybase.
- I have a public key whose fingerprint is 66DE FC48 E0A1 9969 AB1F 97A1 C985 F630 4EC9 1173
To claim this, I am signing this object:
const asyncHooks = require('async_hooks'); | |
const contextStore = new Map(); | |
class Context { | |
constructor() { | |
this.id = Math.random(); | |
} | |
} |
ip6tables -A FORWARD -p tcp --tcp-flags RST RST -j DROP | |
iptables -A FORWARD -p tcp --tcp-flags RST RST -j DROP |
import java.util.{Timer, TimerTask} | |
import akka.actor.{Actor, ActorSystem, Props} | |
import akka.testkit.{ImplicitSender, TestKit} | |
import org.scalatest.{BeforeAndAfterAll, Matchers, WordSpecLike} | |
import scala.concurrent.{Future, Promise} | |
import scala.util.Try |
object Application { | |
case class CsvLine(values: List[String] = Nil, inQuote: Boolean = false, buff: List[Char] = Nil) | |
@tailrec | |
def parseCsvLine(line: CsvLine, remains: List[Char]): List[String] = (line, remains) match { | |
case (CsvLine(values, false, buff), Nil) => | |
values :+ buff.mkString | |
case (CsvLine(values, true, buff), '"' :: Nil) => | |
values :+ buff.mkString |
const p = 0.723; | |
function oldRandom() { | |
return Math.random() < p ? 1 : 0; | |
} | |
const table = [[1, 2], [2, 3], [1, 3]]; | |
let flag = 0; | |
function newRandom() { |
const fetch = require('node-fetch'); | |
const { deepStrictEqual } = require('assert'); | |
function ipv4ToInt(ip) { | |
return ip.split('.').reduce((acc, cur) => acc << 8 | +cur, 0); | |
} | |
function intToIpv4(i) { | |
return `${i >>> 24}.${i >>> 16 & 0xff}.${i >>> 8 & 0xff}.${i & 0xff}`; |
const LOG_LEVELS = ['DEBUG', 'INFO', 'WARN', 'ERROR'] | |
const [LOG_DEBUG, LOG_INFO, LOG_WARN, LOG_ERROR] = LOG_LEVELS; | |
const LOG_LEVEL = LOG_DEBUG; | |
function makeLogFunc(level, func = console.log) { | |
return LOG_LEVELS.indexOf(level) >= LOG_LEVELS.indexOf(LOG_LEVEL) ? (...msg) => { | |
const now = new Date().toLocaleString(); | |
func(...[now, level, ...msg]); | |
} : () => {}; | |
} |
I hereby claim:
To claim this, I am signing this object:
local timer=require'hs.timer' | |
local checkMods=require'hs.eventtap'.checkKeyboardModifiers | |
local function modsPressed() return checkMods(true)._raw>0 end | |
local frontWindows = {} | |
local frontFocusIdx = 0 | |
local modes = { | |
full = { 1 }, | |
half = { 0.5, 0.5 }, |
const fs = require('fs') | |
const http = require('http'); | |
// https://ftp.arin.net/pub/stats/arin/delegated-arin-extended-latest | |
// https://ftp.apnic.net/stats/apnic/delegated-apnic-latest | |
/** | |
* get content from URL | |
* @param {String} url URL | |
* @returns {Promise<String>} the response body of input URL |