Skip to content

Instantly share code, notes, and snippets.

View d6u's full-sized avatar

Daiwei Lu d6u

View GitHub Profile
@d6u
d6u / demo.js
Created July 27, 2016 20:52 — forked from anatoliychakkaev/demo.js
Require in runInNewContext
var Module = require('module');
var vm = require('vm');
var path = require('path');
var filename = process.cwd() + '/lib/eval.js';
var mod = new Module(filename);
var context = {
module: mod,
__filename: filename,
@d6u
d6u / usage.js
Last active August 29, 2015 14:21 — forked from jasonfarrell/usage.js
var my_element = document.getElementById('my-element');
//-- Returns true/false
my_element.isVisible(my_element);
@d6u
d6u / config.fish
Last active August 29, 2015 14:06 — forked from andrewytliu/config.fish
# in ~/.config/fish/config.fish
# Load the default rubies
if test -z $rvm_bin_path
exec bash --login -c "exec fish"
end
@d6u
d6u / flex_sdk.rb
Last active August 29, 2015 14:05 — forked from rjungemann/flash_player.rb
# brew install "https://gist.githubusercontent.com/daiweilu/c62631ac4de8d37e05f2/raw/74353db12db030468edaa4c30e8a124a0c414dc7/flex_sdk.rb"
require 'formula'
class FlexSdk < Formula
homepage "http://www.adobe.com/devnet/flex.html"
url "http://download.macromedia.com/pub/flex/sdk/flex_sdk_4.6.zip"
sha1 "7e66e84bef09e8c2c3183acf548c41d8114516ca"
def install
<!DOCTYPE html>
<head>
<title>Stay Standalone</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="stay_standalone.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li><a href="http://google.com/">Remote Link (Google)</a></li>