Skip to content

Instantly share code, notes, and snippets.

Simon Eng simonwmeng

Block or report user

Report or block simonwmeng

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@simonwmeng
simonwmeng / resetdnscache.sh
Created May 16, 2018
Flushes the DNS routing table for whenever Tunnelblick gets trapped in a TCP connection loop.
View resetdnscache.sh
#!/usr/bin/env bash
# Flushes the DNS routing table for whenever Tunnelblick gets trapped in a TCP
# connection loop.
sudo ifconfig en0 down
sleep 5
sudo route -n flush
sleep 5
sudo ifconfig en0 up
View kde_scatterplot.R
library(data.table)
library(ggplot2)
library(ks)
# This assumes that you have a data.table, stored in `dt.data`, with columns `x` and `y`.
get.densities <- function (x, y) {
# You can also define your own bandwidth matrix or generate one using Hpi().
You can’t perform that action at this time.