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
// ==UserScript== | |
// @name Google Search Result Click Do Not Track | |
// @description 去除Google搜索结果中的URL跟踪跳转 | |
// ==/UserScript== | |
var b=document.body; | |
b.addEventListener("click",checkSingleLink); | |
b.addEventListener("mousedown",checkSingleLink); | |
setTimeout(function () { | |
var input=document.getElementById("lst-ib"); |
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
import java.io.*; | |
import java.util.*; | |
import sun.jvm.hotspot.memory.*; | |
import sun.jvm.hotspot.oops.*; | |
import sun.jvm.hotspot.debugger.*; | |
import sun.jvm.hotspot.runtime.*; | |
import sun.jvm.hotspot.tools.*; | |
import sun.jvm.hotspot.utilities.*; | |
public class DirectMemorySize extends Tool { |
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
[root@NYSJHL102-239 ~]# /opt/j2sdk/bin/jmap -heap 24694 | |
Attaching to process ID 24694, please wait... | |
Debugger attached successfully. | |
Server compiler detected. | |
JVM version is 11.0-b15 | |
using parallel threads in the new generation. | |
using thread-local object allocation. | |
Concurrent Mark-Sweep GC |
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(){ | |
var $$ = function(cmd){ | |
return $("#main").contents().find(cmd); | |
}; | |
$$("#seat_type_code").val(""); | |
$$("#ticket_type_order_num").val(""); | |
$$("#bed_level_order_num").val("000000000000000000000000000000"); | |
$$("#cancel_flag").val("1"); | |
$$("#orderRequest_id_mode").val("Y"); |
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
def conn = new URL("http://autoproxy2pac.appspot.com/pac/u/cafebabe.hu").openConnection(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("10.22.198.188", 8118))); | |
print("begin transfer...") | |
def count = 0; | |
conn.getInputStream().withStream { | |
def of = new File("c:\\cafebabe.hu").newOutputStream() | |
it.eachByte { | |
bt -> of.write(bt);count++;if(count%1024==0)print("."); | |
} |
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($) { | |
$.fn.visibility = function(status) { | |
this.css('visibility',status); | |
return this; | |
} | |
})(jQuery) | |
$('#someElement').visibility('visible') | |
$('#someElement').visibility('hidden') |
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
public class FileBitSort { | |
public static void generateData(String path, int max) throws Exception { | |
File f = new File(path); | |
if (f.exists()) { | |
f.delete(); | |
} else { | |
f.createNewFile(); | |
} |
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
public class GCUtils { | |
private static final String DISABLE_EXPLICIT_GC = "DisableExplicitGC"; // need to be "manageable" in VM | |
public static void forceGC() { | |
String oldValue = HotSpotUtils.getVMOption(DISABLE_EXPLICIT_GC); | |
if ("true".equals(oldValue)) { | |
HotSpotUtils.setVMOption(DISABLE_EXPLICIT_GC, "false"); | |
System.gc(); | |
HotSpotUtils.setVMOption(DISABLE_EXPLICIT_GC, oldValue); | |
} else { |
NewerOlder