Skip to content

Instantly share code, notes, and snippets.

Hello World mcxiaoke

  • Earth
Block or report user

Report or block mcxiaoke

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
mcxiaoke /
Created Dec 19, 2019
Phicomm N1 dtb file for Linux n1 5.3.0-aml-g12

Hardware specs

Chinese Brand "ITworks" , Model TW891, distributed in France and Belgium by Darty

  • CPU: Intel(R) Atom(TM) CPU Z3735F @ 1.33GHz
  • Video: Intel® HD Graphics for Intel Atom® Processor Z3700 Series
  • Screen: 1280x800
  • WiFi + BT: Realtek RTL8723BS_BT
  • Disks: mmcblk1: mmc1:0001 DF4032 29.1 GiB
  • RAM: 2GB DDR3 @ 1333 MHz
mcxiaoke / arduino-esp8266-esp32-wifi.json
Last active Dec 2, 2019
arduino esp8266 esp32 setup wifi code snippet
View arduino-esp8266-esp32-wifi.json
"espwifi": {
"scope": "cpp",
"prefix": "espwifi",
"body": [
"#include <Arduino.h>",
"#if defined(ESP8266)",
"#include <ESP8266WiFi.h>",
"#elif defined(ESP32)",
"#include <WiFi.h>",
View make_vector.hpp
// make_vector.hpp
// Copyright (c) 2019 Tristan Brindle (tcbrindle at gmail dot com)
// Distributed under the Boost Software License, Version 1.0. (See
#include <type_traits>
#include <vector>
namespace tcb {
mcxiaoke /
Created Nov 22, 2019
pump mqtt monitor
from datetime import datetime
import time
import logging
import requests
import re
import paho.mqtt.client as mqtt
from config import *
mcxiaoke /
Created Nov 20, 2019 — forked from jcberthon/
NetworkManager Wi-Fi powersaving configuration

NetworkManager WiFi Power Saving

NetworkManager supports WiFi powersaving but the function is rather undocumented.

From the source code: wifi.powersave can have the following value:

  • NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
  • NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting
View Orange Pi Zero - WiFi setup
sudo cp /etc/network/interfaces /etc/network/interfacesoriginal
sudp rm /etc/network/interfaces
sudo nano /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
mcxiaoke /
Created Oct 28, 2019 — forked from phrawzty/
simple http server to dump request headers
$ curl -s -H "X-Something: yeah" localhost:8000 > /dev/null
$ python
ERROR:root:User-Agent: curl/7.37.1
Host: localhost:8000
Accept: */*
X-Something: yeah
mcxiaoke /
Created Oct 18, 2019 — forked from joseluisq/
Add Git Branch Name to Terminal Prompt (Mac)

Add Git Branch Name to Terminal Prompt (Mac)


Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
mcxiaoke / native jQuery methods.js
Created Oct 4, 2019 — forked from jochemstoel/native jQuery methods.js
Vanilla implementations of commonly used jQuery methods.
View native jQuery methods.js
* Convenient shortcut
Object.defineProperty(window, 'define', {
value: (property, ...meta) => meta.length == 2 ? Object.defineProperty(meta[0], property, meta[1]) : Object.defineProperty(window, property, meta[0]),
writable: false,
enumerable: true
You can’t perform that action at this time.