Skip to content

Instantly share code, notes, and snippets.

View kevinsewell's full-sized avatar

Kevin Sewell kevinsewell

  • Cape Town, South Africa
View GitHub Profile
function FindProxyForURL(url, host) {
PROXY = "PROXY 10.0.2.2:3128";
if (shExpMatch(host, "*.local")) {
return PROXY;
}
return "DIRECT";
}
function FindProxyForURL(url, host) {
PROXY = "PROXY proxy.valuelens.local:3128";
if (shExpMatch(host, "*.local")) {
return PROXY;
}
return "DIRECT";
}
@kevinsewell
kevinsewell / vm.scala
Created August 6, 2022 17:23
Trigger Heap Dump on Spark Executors
import com.sun.tools.attach._
import org.apache.commons.io.IOUtils
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.{FileSystem, Path}
import org.apache.spark.{SparkEnv, TaskContext}
import org.slf4j.{Logger, LoggerFactory}
import sun.tools.attach.HotSpotVirtualMachine
import java.lang.management._
import java.nio.charset.Charset
@kevinsewell
kevinsewell / gist:47feb9f60446d44a831cdefe29202187
Last active December 25, 2022 08:13
Apple PAC Configuration
function FindProxyForURL(url, host) {
PROXY = "SOCKS5 proxy.local:8000;SOCKS proxy.local:8000";
if (shExpMatch(host, "*.rock.apple.com")) {
return PROXY;
}
if (shExpMatch(host, "*.pie.apple.com")) {
return PROXY;
}
return "DIRECT";
}