This file contains hidden or 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 fakeNavigator = {}; | |
| for (var i in navigator) { | |
| fakeNavigator[i] = navigator[i]; | |
| } | |
| fakeNavigator.onLine = true; | |
| navigator = fakeNavigator; |
This file contains hidden or 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 MyApplication(name, opt){ | |
| var self = this; | |
| this.name = name; | |
| this.option = (function(){ | |
| var defaultOpt = { | |
| "loglevel": "verbose" | |
| }; | |
| for (var k in defaultOpt){ | |
| if (opt && opt.hasOwnProperty(k)) defaultOpt[k] = opt[k]; | |
| } |
This file contains hidden or 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
| /** | |
| * Tiny EventEmitter for browser. | |
| * Copyright [Takeharu.Oshida](http://georgeosddev.github.com) | |
| * Licensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT License](http://creativecommons.org/licenses/MIT/) | |
| */ | |
| (function(global){ | |
| var alice = Array.prototype.slice; | |
| function EventEmitter(){ | |
| this.dom = window.document.createDocumentFragment(); | |
| } |
This file contains hidden or 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
| private def get_com_sun_nio_file_SensitivityWatchEventModifier_HIGH: Option[Modifier] = { | |
| try { | |
| val c = Class.forName("com.sun.nio.file.SensitivityWatchEventModifier") | |
| val f = c.getField("HIGH") | |
| val e = f.get(c).asInstanceOf[Modifier] | |
| Some(e) | |
| } catch { | |
| case NonFatal(e) => | |
| None | |
| } |
This file contains hidden or 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
| // Disable javascript execution from console | |
| // http://kspace.in/blog/2013/02/22/disable-javascript-execution-from-console/ | |
| var _z = console; | |
| Object.defineProperty( window, "console", { | |
| get : function(){ | |
| if( _z._commandLineAPI ){ | |
| throw "Sorry, Can't exceute scripts!"; | |
| } | |
| return _z; | |
| }, |
This file contains hidden or 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
| javascript:$(".highlight").css({"width":"1000px","z-index":"1000px"});$(".highlight pre").css({"overflow":"visible"});$("pre").css({"overflow":"visible","width":"1000px","z-index":"1000px"}); |
This file contains hidden or 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
| git commit -m "temp commit log" | |
| git checkout master | |
| git pull | |
| git merge --squash workbranch | |
| git commit -m "commit log for master" | |
| #or | |
| git commit -m "temp commit log" | |
| git checkout master |
This file contains hidden or 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
| cat log/xxx.log | col -bx | sed -e 's/[0-9]\{1,\}m//g' > log/xxx_pretty.log |
This file contains hidden or 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
| <?xml version="1.0"?> | |
| <!-- Path should be correct --> | |
| <!DOCTYPE tsung SYSTEM "/home/ec2-user/opt/tsung-latest/share/tsung/tsung-1.0.dtd"> | |
| <tsung loglevel="notice" version="1.0"> | |
| <!-- Clients to generate load --> | |
| <clients> | |
| <!-- Must be hostname, can't be IP --> | |
| <client host="tsung1" > | |
| <ip scan="true" value="eth0"/> | |
| </client> |
This file contains hidden or 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
| <!-- | |
| http://george-osd-blog.heroku.com/25 | |
| http://george-osd-blog.heroku.com/26 | |
| --> | |
| <?xml version="1.0"?> | |
| <!-- インストールしたTsungのPathとあっていること --> | |
| <!DOCTYPE tsung SYSTEM "/home/ec2-user/opt/tsung-latest/share/tsung/tsung-1.0.dtd"> | |
| <tsung loglevel="notice" version="1.0"> |