# set http proxy
export http_proxy=http://PROXYHOST:PROXYPORT
# set http proxy with user and password
export http_proxy=http://USERNAME:PASSWORD@PROXYHOST:PROXYPORT
# set http proxy with user and password (with special characters)| { | |
| "app-id": "im.srain.Srain", | |
| "runtime": "org.gnome.Platform", | |
| "runtime-version": "3.26", | |
| "sdk": "org.gnome.Sdk", | |
| "command": "srain", | |
| "rename-desktop-file": "Srain.desktop", | |
| "rename-icon": "srain", | |
| "finish-args": [ | |
| "--device=all", |
This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).
The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.
Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se
| -fcolor-diagnostics | |
| -isystem/usr/include/c++/6.2.1/ | |
| -isystem/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/include | |
| -I./inc | |
| -pthread | |
| -I/usr/include/gtk-3.0 | |
| -I/usr/include/at-spi2-atk/2.0 | |
| -I/usr/include/at-spi-2.0 | |
| -I/usr/include/dbus-1.0 | |
| -I/usr/lib/dbus-1.0/include |
| /* MIT License | |
| * | |
| * Copyright (c) 2017 Roland Singer [roland.singer@desertbit.com] | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is | |
| * furnished to do so, subject to the following conditions: |
| // Add support for filesystem+https:// style URL | |
| // url_regex.hh scheme:// -> (scheme:)+// | |
| // gcc preload.c -ldl -fPIC -shared -o preload.so | |
| // LD_PRELOAD=./preload.so /usr/bin/termite | |
| #ifndef _GNU_SOURCE | |
| # define _GNU_SOURCE 1 | |
| #endif | |
| #include <assert.h> | |
| #include <dlfcn.h> |
| #!/usr/bin/env python3 | |
| # http://www.cis.syr.edu/~wedu/seed/Labs_12.04/Software/Format_String/files/vul_prog.c x86-64 | |
| import pty, os, re, struct, subprocess, sys | |
| def readuntil(f, delim): | |
| data = b'' | |
| while not (data.endswith(delim) if type(delim) == bytes else delim.search(data)): | |
| c = f.read(1) | |
| data += c | |
| if not c: |
| <?xml version="1.0"?> | |
| <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
| <!-- /etc/fonts/conf.avail/51-noto-color-emoji.conf --> | |
| <fontconfig> | |
| <selectfont> | |
| <acceptfont> | |
| <pattern> | |
| <patelt name="family"><string>Noto Color Emoji</string></patelt> | |
| </pattern> | |
| </acceptfont> |
| 文字直播,网页载入后,打开devtools(一般是F12),在Console里输入一行js,即可获取通知。若弹出对话框提示Allow notification?选Allow。 | |
| http://bn.sina.cn/video/live/index/tech/alphago?vt=4 人机围棋大战 | |
| Notification.requestPermission(function() { $('section').on('DOMSubtreeModified', function() { var n = new Notification('meow', {body: $('section .chat_item p').eq(0).text().trim()}); setTimeout(function() { n.close() }, 10000) }) }) | |
| http://lives.sina.cn/live/live?live_mg=sports&wm=&livetype=qipai&stype=&vt=4&match_id=l_142874 李世石VS谷歌AlphaGo 人机大战III | |
| http://lives.sina.cn/live/live?live_mg=sports&wm=&livetype=qipai&stype=&vt=4&match_id=l_142961 李世石VS谷歌AlphaGo 人机大战Ⅳ | |
| http://lives.sina.cn/live/live?live_mg=sports&wm=&livetype=qipai&stype=&vt=4&match_id=l_143040 李世石VS谷歌AlphaGo 人机大战V | |
| var orig_increment_apply_do = window.increment_apply_do; window.increment_apply_do = function(rs) { Notification.requestPermission(function() { var n = new Notification('meow', {body: rs.data[0].content}); setTimeout(function() { n.close() }, 10000) }); return orig_increment_apply_do(rs) |
| --[[ | |
| Usage: | |
| -- Start a console instance, holds its own environment | |
| local console = InteractiveConsole { | |
| sum = function(a, b) | |
| return a + b | |
| end | |
| } | |
| -- First call: define output and error functions |