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:7b8c4f0a010eaa4a7183c3181ba8d621
Created October 14, 2016 06:55 — forked from danielestevez/gist:2044589
GIT Commit to an existing Tag
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}
@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 / sync-gitlab-projects
Last active March 24, 2023 02:42 — forked from JonasGroeger/sync-projects
Gitlab: Clone / Pull all projects in a group in gitlab(批量下载gitlab中的项目)
#!/usr/bin/env bash
# should install jq first, for mac:brew install jq
# Documentation
# https://docs.gitlab.com/ce/api/projects.html#list-projects
NAMESPACE="your group name in gitlab"
BASE_PATH="https://gitlab.example.com/"
PROJECT_SEARCH_PARAM=""