Add the following line to /etc/hosts
199.232.28.133 raw.githubusercontent.com
// when your webapp is loaded, before adding listener for weixing js bridge, check if it's already initialized: | |
var timeoutID = 0; | |
if (typeof WeixinJSBridge == "undefined") { | |
alert('Already in WeChat!'); | |
} else { | |
// setup a time out of let's say 5 seconds, to wait for the bridge: | |
timeoutID = window.setTimeout(WeChatBridgeTimeout, 5000); | |
// now add listener for the bridge: | |
document.addEventListener('WeixinJSBridgeReady', WeChatBridgeReady, false); |
{ | |
"always_show_minimap_viewport": true, | |
"auto_complete_commit_on_tab": true, | |
"color_scheme": "Packages/Material Theme/schemes/OLD/Material-Theme-Darker.tmTheme", | |
"default_line_ending": "unix", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"highlight_line": true, | |
"ignored_packages":["Markdown"], | |
"overlay_scroll_bars": "enabled", |
#!/bin/bash | |
# Mount the Installer image | |
hdiutil attach /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app | |
# Create Sierra sparseimage of 7316mb with a Single Partition - Apple Partition Map | |
hdiutil create -o /tmp/Sierra -size 7316m -layout SPUD -fs HFS+J -type SPARSE | |
# Mount the Sierra sparseimage | |
hdiutil attach /tmp/Sierra.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build |
import semver from 'semver'; | |
let supportedEncoding = ['ascii', 'utf8', 'utf16le', 'ucs2', 'base64', | |
'binary', 'hex']; | |
let currentVersion = semver.clean(process.version); | |
/** | |
* Polifills Object to obtain modern APIs. | |
* @param {String} targetVersion Target version to be polyfilled. | |
* @param {Object} object Object to polyfill. |
#!/bin/sh | |
# | |
# pptpd installation script on my own CentOS 7 box. | |
# inspired by: https://www.digitalocean.com/community/questions/how-to-install-pptp-vpn-on-centos-7 | |
# and http://unix.stackexchange.com/questions/150837/redhat-centos-7-firewalld-best-practice-for-pptp-or-l2tp-ipsec-rules | |
# | |
# Author: 2015 Steve Yang <[email protected]> | |
# The script comes with ABSOLUTELY NO WARRANTY. | |