Skip to content

Instantly share code, notes, and snippets.

View medusar's full-sized avatar
🦊
making money

JasonWong medusar

🦊
making money
  • Beijing,China
View GitHub Profile
public class Test{
public void test(){}
}
@medusar
medusar / 0_reuse_code.js
Created April 16, 2016 06:49
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@medusar
medusar / trace.md
Created April 16, 2016 07:01
trace

Analytics

@medusar
medusar / todo.md
Last active April 16, 2016 07:13
TODO List test
  • Pick the flowers
  • Call John 9303032332
  • Cancel cable subscription
  • Book the flight tickets
@medusar
medusar / NULL.java
Last active April 16, 2016 10:03
Java容易迷惑的代码
public class NULL {
public static void haha() {
System.out.println("haha");
}
public static void main(String[] args) {
((NULL)null).haha();
}
}
@medusar
medusar / HelloCovariance.java
Created June 8, 2016 08:13 — forked from AlainODea/HelloCovariance.java
Exception in thread "main" java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
public class HelloConvariance {
public static void main(String[] args) {
ConcurrentHashMap<String, String> properties = new ConcurrentHashMap<>();
Set<String> keySet = properties.keySet();
}
}
@medusar
medusar / gitignore
Created October 11, 2016 07:04
git ignore文件模板
#复制命名为.gitignore
.err
.iml
.log
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
@medusar
medusar / gist:e3481c7335a30e95491ed92bcdd5e000
Created April 6, 2017 02:25 — forked from jcarlosgarcia/gist:1621770
Set system properties via Spring XML configuration
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
<bean id="systemProps" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject" value="#{@systemProperties}" />
<property name="targetMethod" value="putAll" />
@medusar
medusar / pom.xml
Created November 2, 2017 10:11 — forked from tomsoete/pom.xml
Spring Best Practices Maven Pom
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.gordondickens.sample</groupId>
<artifactId>sample-parent</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
@medusar
medusar / linux_smap_analyzer.py
Created January 4, 2018 10:57 — forked from LanderlYoung/linux_smap_analyzer.py
Linux /proc/<pid>/smaps analyzer python script
#!/usr/bin/env python
# encoding: utf-8
from __future__ import print_function
'''
analyze /proc/<pid>/smaps
doc
http://liutaihua.github.io/2013/04/25/process-smaps-analysis.html