Skip to content

Instantly share code, notes, and snippets.

View lidavidm's full-sized avatar

David Li lidavidm

View GitHub Profile
From f0fac89f20340593fdc586cf768cec69bcb20003 Mon Sep 17 00:00:00 2001
From: Alexander Polcyn <apolcyn@google.com>
Date: Thu, 31 Jan 2019 15:06:34 -0800
Subject: [PATCH] Revert "Revert c-ares as the default resolvre"
This reverts commit ca30b2240f6f8e86b51452097c3cb43c5d4f7117.
---
.../filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc | 3 ++-
templates/test/cpp/naming/resolver_component_tests_defs.include | 1 -
test/core/client_channel/resolvers/dns_resolver_test.cc | 5 ++++-
@lidavidm
lidavidm / botproxy.py
Created December 29, 2017 21:46
Halite II remote debugging
import socket
import sys
# Connect
socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.bind(('localhost', int(sys.argv[1])))
socket.listen(1)
connection, _ = socket.accept()
# IO Functions
@lidavidm
lidavidm / generated.js
Created April 1, 2016 23:48
Generated Skulpt code
var $scope0 = (function($modname) {
var $gbl = {},
$blk = 0,
$exc = [],
$loc = $gbl,
$err = undefined;
$gbl.__name__ = $modname, $ret = undefined, currLineNo = undefined, currColNo = undefined;
if (typeof Sk.execStart === 'undefined') {
Sk.execStart = Date.now()
}

Keybase proof

I hereby claim:

  • I am lidavidm on github.
  • I am lidavidm (https://keybase.io/lidavidm) on keybase.
  • I have a public key whose fingerprint is A1F5 3594 0234 AEBA A56A 3243 A751 53D3 42B7 6FF1

To claim this, I am signing this object:

//! # Basic Sample
//!
//! This sample demonstrates how to create a toplevel `window`, set its title, size and position, how to add a `button` to this `window` and how to connect signals with actions.
#![crate_type = "bin"]
extern crate gtk;
use gtk::signal::StatusIconSignals;
use gtk::traits::*;
>>> import functools
>>> def thingy(a, b):
... return "{} {}".format(a, b)
...
>>> data = [0, 1, 2, 3, 4]
>>> a, *b = data
>>> a
0
>>> b
[1, 2, 3, 4]
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lidavidm
lidavidm / gist:9928de726c0aed8a36a8
Last active August 29, 2015 14:15
CEE1130: dml339 Assignment 2
{
"metadata": {
"name": "",
"signature": "sha256:b081ae105846bb3cc979fcc46b848d206e3e2f15b94aa3ae1faf86a1d8ff7480"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@lidavidm
lidavidm / designer.html
Created September 11, 2014 01:37
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">