Skip to content

Instantly share code, notes, and snippets.

View yuxincs's full-sized avatar
💡
Ideas survive in your memory, implementations do not.

Yuxin Wang yuxincs

💡
Ideas survive in your memory, implementations do not.
  • Uber
  • New York City
  • 11:13 (UTC -05:00)
View GitHub Profile
@zz
zz / UbuntuCongestionControlBBR.md
Last active February 12, 2022 16:46 — forked from chalos/UbuntuCongestionControlBBR.md
Ubuntu using BBR
@schnell18
schnell18 / macosx_remove_java9.sh
Created October 8, 2016 13:26
MacOS X remove Java 9
sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
@nuald
nuald / listmacaddrs.c
Last active November 9, 2017 19:19
Getting MAC addresses
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <ifaddrs.h>
#ifdef AF_LINK
# include <net/if_dl.h>
unsigned char *get_ptr(struct ifaddrs *ifaptr) {
if (((ifaptr)->ifa_addr)->sa_family == AF_LINK) {
return (unsigned char *)LLADDR((struct sockaddr_dl *)(ifaptr)->ifa_addr);
#!/usr/bin/env bash
# Exit on error
set -e
# Ensure script is running as root
if [ "$EUID" -ne 0 ]
then echo "WARN: Please run as root (sudo)"
exit 1
fi