This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// vim: set et sw=2 ts=2 sts=2 ff=unix fenc=utf8: | |
// Author: Binux<i@binux.me> | |
// http://binux.me | |
// Created on 2013-09-17 10:53:19 | |
(function() { | |
window.console = window.console || {}; | |
window.console.log = window.console.log || function() {}; | |
var _ = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# parameters | |
# $1 the interface name used by pppd (e.g. ppp3) | |
# $2 the tty device name | |
# $3 the tty device speed | |
# $4 the local IP address for the interface | |
# $5 the remote IP address | |
# $6 the parameter specified by the 'ipparam' option to pppd | |
ip rule | grep vpn || ip rule add table vpn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<script src="http://vjs.zencdn.net/4.3/video.js"></script> | |
<link href="http://vjs.zencdn.net/4.3/video-js.css" rel="stylesheet"> | |
<meta charset=utf-8 /> | |
<title>非常厉害的播放器</title> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<input type="file" id="file" name="file" /><br> | |
<button class=load id="load0" data-start="0" data-stop="0.1" disabled>load 0-10%</button> | |
<button class=load id="load5" data-start="0.1" data-stop="0.2" disabled>load 10%-20%</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 1. Depoly as web app (https://developers.google.com/apps-script/execution_web_apps#deploying) | |
// 2. register as web app through the APIs Console (https://code.google.com/apis/console#access) | |
// 3. add 'client_id', 'client_secret' to project properties. | |
// 4. If published to anyone else, make sure they access to the code. (https://developers.google.com/apps-script/execution_time_triggers) | |
// | |
var script_url = ScriptApp.getService().getUrl(); | |
var client_id = ScriptProperties.getProperty('client_id'); | |
var client_secret = ScriptProperties.getProperty('client_secret'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- encoding: utf-8 -*- | |
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: | |
# Author: Binux<i@binux.me> | |
# http://binux.me | |
# Created on 2013-03-02 19:50:18 | |
import os | |
import re | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function binux_init() { | |
var bdiv = document.createElement('div');bdiv.id = 'binux-overlay';bdiv.setAttribute('style', 'display: none;'); | |
(document.body || document.documentElement).appendChild(bdiv); | |
function getOffset(elem) { | |
var top = 0; | |
var left = 0; | |
do { | |
if ( !isNaN( elem.offsetLeft) ) left += elem.offsetLeft; | |
if ( !isNaN( elem.offsetTop) ) top += elem.offsetTop; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function message(msg) { | |
$('#plexts').append('<div class="plext"><div class="pl_timestamp">'+(new Date()).getHours()+':'+(new Date()).getMinutes()+'</div><div class="pl_content pl_player"><span class="ALIENS">System: </span>'+msg+'</div></div>'); | |
$('#plext_container').scrollTop($('#plext_container')[0].scrollHeight); | |
} | |
google.maps.event.addListener(Z.c().h, 'rightclick', function(event) { | |
message('@'+event.latLng.Ya+', '+event.latLng.Za); | |
}); | |
U.prototype._show = U.prototype.show; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _map = R; | |
var rectangle = new google.maps.Rectangle({ | |
bounds: _map.getBounds(), | |
editable: true, | |
map: _map | |
}); | |
function message(msg) { | |
$('#plexts').append('<div class="plext"><div class="pl_timestamp">'+(new Date()).getHours()+':'+(new Date()).getMinutes()+'</div><div class="pl_content pl_player"><span class="ALIENS">System: </span>'+msg+'</div></div>'); | |
$('#plext_container').scrollTop($('#plext_container')[0].scrollHeight); |